[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 8/9] target/cris: Use movcond for t_gen_cc_jmp
From: |
Richard Henderson |
Subject: |
[PATCH 8/9] target/cris: Use movcond for t_gen_cc_jmp |
Date: |
Sat, 19 Jun 2021 21:21:40 -0700 |
This is better than branch around assignment.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/cris/translate.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/target/cris/translate.c b/target/cris/translate.c
index 3515c21b7b..e4cbc35ebd 100644
--- a/target/cris/translate.c
+++ b/target/cris/translate.c
@@ -516,13 +516,9 @@ static void t_gen_swapr(TCGv d, TCGv s)
static void t_gen_cc_jmp(TCGv pc_true, TCGv pc_false)
{
- TCGLabel *l1 = gen_new_label();
-
/* Conditional jmp. */
- tcg_gen_mov_tl(env_pc, pc_false);
- tcg_gen_brcondi_tl(TCG_COND_EQ, env_btaken, 0, l1);
- tcg_gen_mov_tl(env_pc, pc_true);
- gen_set_label(l1);
+ tcg_gen_movcond_tl(TCG_COND_NE, env_pc, env_btaken, tcg_constant_tl(0),
+ pc_true, pc_false);
}
static inline bool use_goto_tb(DisasContext *dc, target_ulong dest)
--
2.25.1
- [PATCH 0/9] target/cris: Convert to TranslatorOps, Richard Henderson, 2021/06/20
- [PATCH 1/9] target/cris: Add DisasContextBase to DisasContext, Richard Henderson, 2021/06/20
- [PATCH 2/9] target/cris: Replace DISAS_TB_JUMP with DISAS_NORETURN, Richard Henderson, 2021/06/20
- [PATCH 5/9] target/cris: Convert to TranslatorOps, Richard Henderson, 2021/06/20
- [PATCH 6/9] target/cris: Mark helper_raise_exception noreturn, Richard Henderson, 2021/06/20
- [PATCH 4/9] target/cris: Remove DISAS_SWI, Richard Henderson, 2021/06/20
- [PATCH 7/9] target/cris: Mark static arrays const, Richard Henderson, 2021/06/20
- [PATCH 9/9] target/cris: Use tcg_gen_lookup_and_goto_ptr, Richard Henderson, 2021/06/20
- [PATCH 3/9] target/cris: Mark exceptions as DISAS_NORETURN, Richard Henderson, 2021/06/20
- [PATCH 8/9] target/cris: Use movcond for t_gen_cc_jmp,
Richard Henderson <=