Commit 9575cb94930895225ec1f6538ba1f74dda0342aa

Authored by bellard
1 parent 960540b4

fixed exceptions for cpuid and invlpg

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4664 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 6 additions and 0 deletions
target-i386/translate.c
... ... @@ -6407,6 +6407,9 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
6407 6407 break;
6408 6408 #endif
6409 6409 case 0x1a2: /* cpuid */
  6410 + if (s->cc_op != CC_OP_DYNAMIC)
  6411 + gen_op_set_cc_op(s->cc_op);
  6412 + gen_jmp_im(pc_start - s->cs_base);
6410 6413 tcg_gen_helper_0_0(helper_cpuid);
6411 6414 break;
6412 6415 case 0xf4: /* hlt */
... ... @@ -6700,6 +6703,9 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
6700 6703 goto illegal_op;
6701 6704 }
6702 6705 } else {
  6706 + if (s->cc_op != CC_OP_DYNAMIC)
  6707 + gen_op_set_cc_op(s->cc_op);
  6708 + gen_jmp_im(pc_start - s->cs_base);
6703 6709 gen_lea_modrm(s, modrm, &reg_addr, &offset_addr);
6704 6710 tcg_gen_helper_0_1(helper_invlpg, cpu_A0);
6705 6711 gen_jmp_im(s->pc - s->cs_base);
... ...