aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-30 17:51:26 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-30 17:51:26 +0000
commitefade670fe2c97c820cff17bb9d7817b8607c5fb (patch)
treeb40c3626e96199182a75e076af233e8f7b18dfd9 /target-i386
parentbf20dc076b30e474635679e167c3ac04b656bb63 (diff)
Fix rdtsc instruction counting.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4810 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 ea0933ef5c..f7313ea8e4 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -6382,7 +6382,13 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
if (s->cc_op != CC_OP_DYNAMIC)
gen_op_set_cc_op(s->cc_op);
gen_jmp_im(pc_start - s->cs_base);
+ if (use_icount)
+ gen_io_start();
tcg_gen_helper_0_0(helper_rdtsc);
+ if (use_icount) {
+ gen_io_end();
+ gen_jmp(s, s->pc - s->cs_base);
+ }
break;
case 0x133: /* rdpmc */
if (s->cc_op != CC_OP_DYNAMIC)