aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-04 17:12:40 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-04 17:12:40 +0000
commit9575cb94930895225ec1f6538ba1f74dda0342aa (patch)
tree2206fbe582ec34ef70de38cc8c260ae8e27991b5 /target-i386
parent960540b4d229318592135b0faa5c958c00af6e39 (diff)
fixed exceptions for cpuid and invlpg
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4664 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/translate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/target-i386/translate.c b/target-i386/translate.c
index fb695003d5..85495a9d1d 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -6407,6 +6407,9 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
break;
#endif
case 0x1a2: /* cpuid */
+ if (s->cc_op != CC_OP_DYNAMIC)
+ gen_op_set_cc_op(s->cc_op);
+ gen_jmp_im(pc_start - s->cs_base);
tcg_gen_helper_0_0(helper_cpuid);
break;
case 0xf4: /* hlt */
@@ -6700,6 +6703,9 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
goto illegal_op;
}
} else {
+ if (s->cc_op != CC_OP_DYNAMIC)
+ gen_op_set_cc_op(s->cc_op);
+ gen_jmp_im(pc_start - s->cs_base);
gen_lea_modrm(s, modrm, &reg_addr, &offset_addr);
tcg_gen_helper_0_1(helper_invlpg, cpu_A0);
gen_jmp_im(s->pc - s->cs_base);