[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/23] target-sparc: Use movcond in gen_generic_bran
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 15/23] target-sparc: Use movcond in gen_generic_branch |
Date: |
Fri, 5 Oct 2012 16:55:02 -0700 |
Signed-off-by: Richard Henderson <address@hidden>
---
target-sparc/translate.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index 9aef8e5..c1a1dc4 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -1107,19 +1107,15 @@ static inline void gen_branch_a(DisasContext *dc,
target_ulong pc1,
static inline void gen_generic_branch(DisasContext *dc)
{
- int l1, l2;
-
- l1 = gen_new_label();
- l2 = gen_new_label();
+ TCGv npc0 = tcg_const_tl(dc->jump_pc[0]);
+ TCGv npc1 = tcg_const_tl(dc->jump_pc[1]);
+ TCGv zero = tcg_const_tl(0);
- tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_cond, 0, l1);
+ tcg_gen_movcond_tl(TCG_COND_NE, cpu_npc, cpu_cond, zero, npc0, npc1);
- tcg_gen_movi_tl(cpu_npc, dc->jump_pc[0]);
- tcg_gen_br(l2);
-
- gen_set_label(l1);
- tcg_gen_movi_tl(cpu_npc, dc->jump_pc[1]);
- gen_set_label(l2);
+ tcg_temp_free(npc0);
+ tcg_temp_free(npc1);
+ tcg_temp_free(zero);
}
/* call this function before using the condition register as it may
--
1.7.11.4
- [Qemu-devel] [PATCH 08/23] target-sparc: Tidy save_npc interface, (continued)
- [Qemu-devel] [PATCH 08/23] target-sparc: Tidy save_npc interface, Richard Henderson, 2012/10/05
- [Qemu-devel] [PATCH 09/23] target-sparc: Tidy gen_generic_branch interface, Richard Henderson, 2012/10/05
- [Qemu-devel] [PATCH 17/23] target-sparc: Tidy Tcc, Richard Henderson, 2012/10/05
- [Qemu-devel] [PATCH 12/23] target-sparc: Use DisasCompare and movcond in FMOVR, FMOVCC, Richard Henderson, 2012/10/05
- [Qemu-devel] [PATCH 11/23] target-sparc: Use DisasCompare in Tcc, Richard Henderson, 2012/10/05
- [Qemu-devel] [PATCH 13/23] target-sparc: Use DisasCompare and movcond in MOVCC, Richard Henderson, 2012/10/05
- [Qemu-devel] [PATCH 18/23] target-sparc: Move taddcctv and tsubcctv out of line, Richard Henderson, 2012/10/05
- [Qemu-devel] [PATCH 04/23] target-sparc: Tidy flush_cond interface, Richard Henderson, 2012/10/05
- [Qemu-devel] [PATCH 16/23] target-sparc: Move sdivx and udivx out of line, Richard Henderson, 2012/10/05
- [Qemu-devel] [PATCH 14/23] target-sparc: Use DisasCompare and movcond in MOVR, Richard Henderson, 2012/10/05
- [Qemu-devel] [PATCH 15/23] target-sparc: Use movcond in gen_generic_branch,
Richard Henderson <=
- [Qemu-devel] [PATCH 21/23] target-sparc: Cleanup "global" temporary allocation, Richard Henderson, 2012/10/05
- [Qemu-devel] [PATCH 23/23] target-sparc: Optimize conditionals using SUBCC, Richard Henderson, 2012/10/05
- [Qemu-devel] [PATCH 22/23] target-sparc: Fall through from not-taken trap, Richard Henderson, 2012/10/05
- [Qemu-devel] [PATCH 19/23] target-sparc: Use movcond in mulscc, Richard Henderson, 2012/10/05
- [Qemu-devel] [PATCH 20/23] target-sparc: Use movcond for FMOV*R, Richard Henderson, 2012/10/05
- Re: [Qemu-devel] [PATCH 00/23] target-sparc comparison improvements, Blue Swirl, 2012/10/07