diff mbox series

[12/20] target/sparc: Do flush_cond in advance_jump_cond

Message ID 20231017064109.681935-13-richard.henderson@linaro.org
State New
Headers show
Series target/sparc: Cleanup condition codes etc | expand

Commit Message

Richard Henderson Oct. 17, 2023, 6:41 a.m. UTC
Do this here instead of in each caller.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/sparc/translate.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index a75f75dfb9..74a0972bda 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -2317,6 +2317,8 @@  static bool advance_jump_cond(DisasContext *dc, DisasCompare *cmp,
 {
     target_ulong npc = dc->npc;
 
+    flush_cond(dc);
+
     if (annul) {
         TCGLabel *l1 = gen_new_label();
 
@@ -2392,8 +2394,6 @@  static bool do_bpcc(DisasContext *dc, arg_bcc *a)
     case 0x8:
         return advance_jump_uncond_always(dc, a->a, target);
     default:
-        flush_cond(dc);
-
         gen_compare(&cmp, a->cc, a->cond, dc);
         return advance_jump_cond(dc, &cmp, a->a, target);
     }
@@ -2419,8 +2419,6 @@  static bool do_fbpfcc(DisasContext *dc, arg_bcc *a)
     case 0x8:
         return advance_jump_uncond_always(dc, a->a, target);
     default:
-        flush_cond(dc);
-
         gen_fcompare(&cmp, a->cc, a->cond);
         return advance_jump_cond(dc, &cmp, a->a, target);
     }
@@ -2446,8 +2444,6 @@  static bool trans_BPr(DisasContext *dc, arg_BPr *a)
         target &= 0xffffffffULL;
     }
 
-    flush_cond(dc);
-
     gen_compare_reg(&cmp, a->cond, gen_load_gpr(dc, a->rs1));
     return advance_jump_cond(dc, &cmp, a->a, target);
 }