[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 17/94] target/sparc: Merge gen_fcond with only caller
From: |
Richard Henderson |
Subject: |
[PATCH v5 17/94] target/sparc: Merge gen_fcond with only caller |
Date: |
Sun, 22 Oct 2023 16:28:15 -0700 |
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sparc/translate.c | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 2664db302d..b8d51d6d64 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -1309,19 +1309,6 @@ static void gen_fcompare(DisasCompare *cmp, unsigned int
cc, unsigned int cond)
}
}
-static void gen_fcond(TCGv r_dst, unsigned int cc, unsigned int cond)
-{
- DisasCompare cmp;
- gen_fcompare(&cmp, cc, cond);
-
- /* The interface is to return a boolean in r_dst. */
- if (cmp.is_bool) {
- tcg_gen_mov_tl(r_dst, cmp.c1);
- } else {
- tcg_gen_setcond_tl(cmp.cond, r_dst, cmp.c1, cmp.c2);
- }
-}
-
// Inverted logic
static const TCGCond gen_tcg_cond_reg[8] = {
TCG_COND_NEVER, /* reserved */
@@ -2992,6 +2979,7 @@ TRANS(BPcc, 64, do_bpcc, a)
static bool do_fbpfcc(DisasContext *dc, arg_bcc *a)
{
target_long target = address_mask_i(dc, dc->pc + a->i * 4);
+ DisasCompare cmp;
if (gen_trap_ifnofpu(dc)) {
return true;
@@ -3003,7 +2991,13 @@ static bool do_fbpfcc(DisasContext *dc, arg_bcc *a)
return advance_jump_uncond_always(dc, a->a, target);
default:
flush_cond(dc);
- gen_fcond(cpu_cond, a->cc, a->cond);
+
+ gen_fcompare(&cmp, a->cc, a->cond);
+ if (cmp.is_bool) {
+ tcg_gen_mov_tl(cpu_cond, cmp.c1);
+ } else {
+ tcg_gen_setcond_tl(cmp.cond, cpu_cond, cmp.c1, cmp.c2);
+ }
return advance_jump_cond(dc, a->a, target);
}
}
--
2.34.1
- [PATCH v5 06/94] target/sparc: Define features via cpu-feature.h.inc, (continued)
- [PATCH v5 06/94] target/sparc: Define features via cpu-feature.h.inc, Richard Henderson, 2023/10/22
- [PATCH v5 07/94] target/sparc: Use CPU_FEATURE_BIT_* for cpu properties, Richard Henderson, 2023/10/22
- [PATCH v5 04/94] target/sparc: Set TCG_GUEST_DEFAULT_MO, Richard Henderson, 2023/10/22
- [PATCH v5 01/94] target/sparc: Clear may_lookup for npc == DYNAMIC_PC, Richard Henderson, 2023/10/22
- [PATCH v5 08/94] target/sparc: Remove sparcv7 cpu features, Richard Henderson, 2023/10/22
- [PATCH v5 11/94] target/sparc: Define AM_CHECK for sparc32, Richard Henderson, 2023/10/22
- [PATCH v5 09/94] target/sparc: Partition cpu features, Richard Henderson, 2023/10/22
- [PATCH v5 14/94] target/sparc: Move BPr to decodetree, Richard Henderson, 2023/10/22
- [PATCH v5 22/94] target/sparc: Move RDASR, STBAR, MEMBAR to decodetree, Richard Henderson, 2023/10/22
- [PATCH v5 25/94] target/sparc: Move RDTBR, FLUSHW to decodetree, Richard Henderson, 2023/10/22
- [PATCH v5 17/94] target/sparc: Merge gen_fcond with only caller,
Richard Henderson <=
- [PATCH v5 12/94] target/sparc: Move CALL to decodetree, Richard Henderson, 2023/10/22
- [PATCH v5 15/94] target/sparc: Move FBPfcc and FBfcc to decodetree, Richard Henderson, 2023/10/22
- [PATCH v5 18/94] target/sparc: Merge gen_branch_[an] with only caller, Richard Henderson, 2023/10/22
- [PATCH v5 26/94] target/sparc: Move WRASR to decodetree, Richard Henderson, 2023/10/22
- [PATCH v5 30/94] target/sparc: Remove cpu_wim, Richard Henderson, 2023/10/22
- [PATCH v5 32/94] target/sparc: Remove cpu_hintp, cpu_htba, cpu_hver, cpu_ssr, cpu_ver, Richard Henderson, 2023/10/22
- [PATCH v5 29/94] target/sparc: Move WRTBR, WRHPR to decodetree, Richard Henderson, 2023/10/22
- [PATCH v5 33/94] target/sparc: Move basic arithmetic to decodetree, Richard Henderson, 2023/10/22
- [PATCH v5 13/94] target/sparc: Move BPcc and Bicc to decodetree, Richard Henderson, 2023/10/22
- [PATCH v5 10/94] target/sparc: Add decodetree infrastructure, Richard Henderson, 2023/10/22