From a94e31165d56573e77163aa81d39426f0d464432 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Wed, 2 Sep 2015 12:00:43 +0800 Subject: [PATCH] x86: fix issue #95 --- qemu/target-i386/translate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qemu/target-i386/translate.c b/qemu/target-i386/translate.c index 137d9159..07c877f1 100644 --- a/qemu/target-i386/translate.c +++ b/qemu/target-i386/translate.c @@ -8175,9 +8175,15 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, // printf("\n"); if (changed_cc_op) { if (cc_op_dirty) +#if TCG_TARGET_REG_BITS == 32 + *(save_opparam_ptr + 16) = s->pc - pc_start; + else + *(save_opparam_ptr + 14) = s->pc - pc_start; +#else *(save_opparam_ptr + 12) = s->pc - pc_start; else *(save_opparam_ptr + 10) = s->pc - pc_start; +#endif } else { *(save_opparam_ptr + 1) = s->pc - pc_start; }