From 25983cad31969e3003eef77bc03a6700f46899d2 Mon Sep 17 00:00:00 2001 From: Evgeny Voevodin Date: Wed, 21 Nov 2012 11:43:04 +0400 Subject: TCG: Use gen_opc_pc from context instead of global variable. Signed-off-by: Evgeny Voevodin Signed-off-by: Blue Swirl --- target-i386/translate.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'target-i386') diff --git a/target-i386/translate.c b/target-i386/translate.c index 8e676ba1a8..aea843cafe 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -7990,7 +7990,7 @@ static inline void gen_intermediate_code_internal(CPUX86State *env, while (lj < j) gen_opc_instr_start[lj++] = 0; } - gen_opc_pc[lj] = pc_ptr; + tcg_ctx.gen_opc_pc[lj] = pc_ptr; gen_opc_cc_op[lj] = dc->cc_op; gen_opc_instr_start[lj] = 1; gen_opc_icount[lj] = num_insns; @@ -8081,15 +8081,16 @@ void restore_state_to_opc(CPUX86State *env, TranslationBlock *tb, int pc_pos) qemu_log("RESTORE:\n"); for(i = 0;i <= pc_pos; i++) { if (gen_opc_instr_start[i]) { - qemu_log("0x%04x: " TARGET_FMT_lx "\n", i, gen_opc_pc[i]); + qemu_log("0x%04x: " TARGET_FMT_lx "\n", i, + tcg_ctx.gen_opc_pc[i]); } } qemu_log("pc_pos=0x%x eip=" TARGET_FMT_lx " cs_base=%x\n", - pc_pos, gen_opc_pc[pc_pos] - tb->cs_base, + pc_pos, tcg_ctx.gen_opc_pc[pc_pos] - tb->cs_base, (uint32_t)tb->cs_base); } #endif - env->eip = gen_opc_pc[pc_pos] - tb->cs_base; + env->eip = tcg_ctx.gen_opc_pc[pc_pos] - tb->cs_base; cc_op = gen_opc_cc_op[pc_pos]; if (cc_op != CC_OP_DYNAMIC) env->cc_op = cc_op; -- cgit v1.2.3