Revision dc196a57 target-i386/cpu.h

b/target-i386/cpu.h
116 116
/* 16 or 32 segments */
117 117
#define HF_CS32_SHIFT        4
118 118
#define HF_SS32_SHIFT        5
119
/* zero base for DS, ES and SS */
119
/* zero base for DS, ES and SS : can be '0' only in 32 bit CS segment */
120 120
#define HF_ADDSEG_SHIFT      6
121 121
/* copy of CR0.PE (protected mode) */
122 122
#define HF_PE_SHIFT          7
......
398 398
        >> (DESC_B_SHIFT - HF_CS32_SHIFT);
399 399
    new_hflags |= (env->segs[R_SS].flags & DESC_B_MASK)
400 400
        >> (DESC_B_SHIFT - HF_SS32_SHIFT);
401
    if (!(env->cr[0] & CR0_PE_MASK) || (env->eflags & VM_MASK)) {
401
    if (!(env->cr[0] & CR0_PE_MASK) || 
402
        (env->eflags & VM_MASK) ||
403
        !(new_hflags & HF_CS32_MASK)) {
402 404
        /* XXX: try to avoid this test. The problem comes from the
403 405
           fact that is real mode or vm86 mode we only modify the
404 406
           'base' and 'selector' fields of the segment cache to go

Also available in: Unified diff