Message ID | 20210620042141.1235541-9-richard.henderson@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | target/cris: Convert to TranslatorOps | expand |
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)
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(-)