From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0dnN-0004i0-CK for qemu-devel@nongnu.org; Tue, 07 Jan 2014 16:02:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0dnI-0003sF-AO for qemu-devel@nongnu.org; Tue, 07 Jan 2014 16:02:41 -0500 Received: from mail-qa0-x232.google.com ([2607:f8b0:400d:c00::232]:54520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0dnI-0003s8-3d for qemu-devel@nongnu.org; Tue, 07 Jan 2014 16:02:36 -0500 Received: by mail-qa0-f50.google.com with SMTP id k4so1078448qaq.9 for ; Tue, 07 Jan 2014 13:02:35 -0800 (PST) Sender: Richard Henderson From: Richard Henderson Date: Tue, 7 Jan 2014 13:00:38 -0800 Message-Id: <1389128439-10067-49-git-send-email-rth@twiddle.net> In-Reply-To: <1389128439-10067-1-git-send-email-rth@twiddle.net> References: <1389128439-10067-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PULL 48/49] target-i386: Rename gen_op_jmp_T0 to gen_op_jmp_v List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@amazon.com And make the destination argument explicit. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-i386/translate.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index ac78fd2..ed3e6ce 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -398,9 +398,9 @@ static void gen_add_A0_im(DisasContext *s, int val) gen_op_addl_A0_im(val); } -static inline void gen_op_jmp_T0(void) +static inline void gen_op_jmp_v(TCGv dest) { - tcg_gen_st_tl(cpu_T[0], cpu_env, offsetof(CPUX86State, eip)); + tcg_gen_st_tl(dest, cpu_env, offsetof(CPUX86State, eip)); } static inline void gen_op_add_reg_im(TCGMemOp size, int reg, int32_t val) @@ -495,7 +495,7 @@ static inline void gen_op_st_rm_T0_A0(DisasContext *s, int idx, int d) static inline void gen_jmp_im(target_ulong pc) { tcg_gen_movi_tl(cpu_tmp0, pc); - tcg_gen_st_tl(cpu_tmp0, cpu_env, offsetof(CPUX86State, eip)); + gen_op_jmp_v(cpu_tmp0); } static inline void gen_string_movl_A0_ESI(DisasContext *s) @@ -4918,7 +4918,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, next_eip = s->pc - s->cs_base; tcg_gen_movi_tl(cpu_T[1], next_eip); gen_push_v(s, cpu_T[1]); - gen_op_jmp_T0(); + gen_op_jmp_v(cpu_T[0]); gen_eob(s); break; case 3: /* lcall Ev */ @@ -4945,7 +4945,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, if (dflag == MO_16) { tcg_gen_ext16u_tl(cpu_T[0], cpu_T[0]); } - gen_op_jmp_T0(); + gen_op_jmp_v(cpu_T[0]); gen_eob(s); break; case 5: /* ljmp Ev */ @@ -4962,7 +4962,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, } else { gen_op_movl_seg_T0_vm(R_CS); tcg_gen_mov_tl(cpu_T[0], cpu_T[1]); - gen_op_jmp_T0(); + gen_op_jmp_v(cpu_T[0]); } gen_eob(s); break; @@ -6358,14 +6358,14 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, ot = gen_pop_T0(s); gen_stack_update(s, val + (1 << ot)); /* Note that gen_pop_T0 uses a zero-extending load. */ - gen_op_jmp_T0(); + gen_op_jmp_v(cpu_T[0]); gen_eob(s); break; case 0xc3: /* ret */ ot = gen_pop_T0(s); gen_pop_update(s, ot); /* Note that gen_pop_T0 uses a zero-extending load. */ - gen_op_jmp_T0(); + gen_op_jmp_v(cpu_T[0]); gen_eob(s); break; case 0xca: /* lret im */ @@ -6383,7 +6383,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, gen_op_ld_v(s, dflag, cpu_T[0], cpu_A0); /* NOTE: keeping EIP updated is not a problem in case of exception */ - gen_op_jmp_T0(); + gen_op_jmp_v(cpu_T[0]); /* pop selector */ gen_op_addl_A0_im(1 << dflag); gen_op_ld_v(s, dflag, cpu_T[0], cpu_A0); -- 1.8.4.2