From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKHjp-000754-Ne for qemu-devel@nongnu.org; Fri, 05 Oct 2012 19:55:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKHjm-0003Qn-DN for qemu-devel@nongnu.org; Fri, 05 Oct 2012 19:55:24 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:49470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKHjm-0003Pu-5x for qemu-devel@nongnu.org; Fri, 05 Oct 2012 19:55:22 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp2so2425530pbb.4 for ; Fri, 05 Oct 2012 16:55:21 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Fri, 5 Oct 2012 16:54:51 -0700 Message-Id: <1349481310-9237-5-git-send-email-rth@twiddle.net> In-Reply-To: <1349481310-9237-1-git-send-email-rth@twiddle.net> References: <1349481310-9237-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 04/23] target-sparc: Tidy flush_cond interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl We always pass cpu_cond to the cond parameter. Use that global register directly instead of passing it down. Signed-off-by: Richard Henderson --- target-sparc/translate.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 079a040..5b2d5ea 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -1118,10 +1118,10 @@ static inline void gen_generic_branch(target_ulong npc1, target_ulong npc2, /* call this function before using the condition register as it may have been set for a jump */ -static inline void flush_cond(DisasContext *dc, TCGv cond) +static inline void flush_cond(DisasContext *dc) { if (dc->npc == JUMP_PC) { - gen_generic_branch(dc->jump_pc[0], dc->jump_pc[1], cond); + gen_generic_branch(dc->jump_pc[0], dc->jump_pc[1], cpu_cond); dc->npc = DYNAMIC_PC; } } @@ -1367,7 +1367,7 @@ static void do_branch(DisasContext *dc, int32_t offset, uint32_t insn, int cc) tcg_gen_mov_tl(cpu_pc, cpu_npc); } } else { - flush_cond(dc, cpu_cond); + flush_cond(dc); gen_cond(cpu_cond, cc, cond, dc); if (a) { gen_branch_a(dc, target, dc->npc, cpu_cond); @@ -1416,7 +1416,7 @@ static void do_fbranch(DisasContext *dc, int32_t offset, uint32_t insn, int cc) tcg_gen_mov_tl(cpu_pc, cpu_npc); } } else { - flush_cond(dc, cpu_cond); + flush_cond(dc); gen_fcond(cpu_cond, cc, cond); if (a) { gen_branch_a(dc, target, dc->npc, cpu_cond); @@ -1445,7 +1445,7 @@ static void do_branch_reg(DisasContext *dc, int32_t offset, uint32_t insn, if (unlikely(AM_CHECK(dc))) { target &= 0xffffffffULL; } - flush_cond(dc, cpu_cond); + flush_cond(dc); gen_cond_reg(cpu_cond, cond, r_reg); if (a) { gen_branch_a(dc, target, dc->npc, cpu_cond); -- 1.7.11.4