diff options
author | Richard Henderson <rth@twiddle.net> | 2012-10-05 16:55:02 -0700 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2012-10-07 16:39:32 +0000 |
commit | 61316742e2bc7b5b5257198f2248c42a9d238c84 (patch) | |
tree | 2ee418521c6380153f8bae1f13667b018d3ce214 /target-sparc | |
parent | c33f80f52a4621e6ed2d021adb08c7de8bec09d8 (diff) | |
download | qemu-61316742e2bc7b5b5257198f2248c42a9d238c84.zip qemu-61316742e2bc7b5b5257198f2248c42a9d238c84.tar.gz qemu-61316742e2bc7b5b5257198f2248c42a9d238c84.tar.bz2 |
target-sparc: Use movcond in gen_generic_branch
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-sparc')
-rw-r--r-- | target-sparc/translate.c | 18 |
1 files 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 |