Revision 12e26b75 target-i386/translate.c

b/target-i386/translate.c
103 103
    int cpuid_features;
104 104
    int cpuid_ext_features;
105 105
    int cpuid_ext2_features;
106
    int cpuid_ext3_features;
106 107
} DisasContext;
107 108

  
108 109
static void gen_eob(DisasContext *s);
......
5829 5830
        }
5830 5831
        break;
5831 5832
    case 0x9e: /* sahf */
5832
        if (CODE64(s))
5833
        if (CODE64(s) && !(s->cpuid_ext3_features & CPUID_EXT3_LAHF_LM))
5833 5834
            goto illegal_op;
5834 5835
        gen_op_mov_TN_reg(OT_BYTE, 0, R_AH);
5835 5836
        if (s->cc_op != CC_OP_DYNAMIC)
......
5841 5842
        s->cc_op = CC_OP_EFLAGS;
5842 5843
        break;
5843 5844
    case 0x9f: /* lahf */
5844
        if (CODE64(s))
5845
        if (CODE64(s) && !(s->cpuid_ext3_features & CPUID_EXT3_LAHF_LM))
5845 5846
            goto illegal_op;
5846 5847
        if (s->cc_op != CC_OP_DYNAMIC)
5847 5848
            gen_op_set_cc_op(s->cc_op);
......
7058 7059
    dc->cpuid_features = env->cpuid_features;
7059 7060
    dc->cpuid_ext_features = env->cpuid_ext_features;
7060 7061
    dc->cpuid_ext2_features = env->cpuid_ext2_features;
7062
    dc->cpuid_ext3_features = env->cpuid_ext3_features;
7061 7063
#ifdef TARGET_X86_64
7062 7064
    dc->lma = (flags >> HF_LMA_SHIFT) & 1;
7063 7065
    dc->code64 = (flags >> HF_CS64_SHIFT) & 1;

Also available in: Unified diff