[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 16/90] target/sparc: Merge gen_fcond with only caller
|
From: |
Richard Henderson |
|
Subject: |
[PATCH v2 16/90] target/sparc: Merge gen_fcond with only caller |
|
Date: |
Mon, 16 Oct 2023 23:11:30 -0700 |
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 61a75b5fab..cc19f0606e 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -1304,19 +1304,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 */
@@ -2990,6 +2977,7 @@ TRANS(Bicc, ALL, do_bpcc, a)
static bool do_fbpfcc(DisasContext *dc, arg_bcc *a)
{
target_long target = dc->pc + a->i * 4;
+ DisasCompare cmp;
if (gen_trap_ifnofpu(dc)) {
return true;
@@ -3004,7 +2992,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 v2 06/90] target/sparc: Define features via cpu-feature.h.inc, (continued)
- [PATCH v2 06/90] target/sparc: Define features via cpu-feature.h.inc, Richard Henderson, 2023/10/17
- [PATCH v2 05/90] configs: Enable MTTCG for sparc, sparc64, Richard Henderson, 2023/10/17
- [PATCH v2 07/90] target/sparc: Use CPU_FEATURE_BIT_* for cpu properties, Richard Henderson, 2023/10/17
- [PATCH v2 10/90] target/sparc: Define AM_CHECK for sparc32, Richard Henderson, 2023/10/17
- [PATCH v2 13/90] target/sparc: Move BPr to decodetree, Richard Henderson, 2023/10/17
- [PATCH v2 15/90] target/sparc: Merge gen_cond with only caller, Richard Henderson, 2023/10/17
- [PATCH v2 11/90] target/sparc: Move CALL to decodetree, Richard Henderson, 2023/10/17
- [PATCH v2 09/90] target/sparc: Add decodetree infrastructure, Richard Henderson, 2023/10/17
- [PATCH v2 12/90] target/sparc: Move BPcc and Bicc to decodetree, Richard Henderson, 2023/10/17
- [PATCH v2 14/90] target/sparc: Move FBPfcc and FBfcc to decodetree, Richard Henderson, 2023/10/17
- [PATCH v2 16/90] target/sparc: Merge gen_fcond with only caller,
Richard Henderson <=
- [PATCH v2 18/90] target/sparc: Pass DisasCompare to advance_jump_cond, Richard Henderson, 2023/10/17
- [PATCH v2 19/90] target/sparc: Move SETHI to decodetree, Richard Henderson, 2023/10/17
- [PATCH v2 20/90] target/sparc: Move Tcc to decodetree, Richard Henderson, 2023/10/17
- [PATCH v2 17/90] target/sparc: Merge gen_branch_[an] with only caller, Richard Henderson, 2023/10/17
- [PATCH v2 21/90] target/sparc: Move RDASR, STBAR, MEMBAR to decodetree, Richard Henderson, 2023/10/17
- [PATCH v2 22/90] target/sparc: Move RDPSR, RDHPR to decodetree, Richard Henderson, 2023/10/17
- [PATCH v2 08/90] target/sparc: Remove sparcv7 cpu features, Richard Henderson, 2023/10/17
- [PATCH v2 23/90] target/sparc: Move RDWIM, RDPR to decodetree, Richard Henderson, 2023/10/17
- [PATCH v2 24/90] target/sparc: Move RDTBR, FLUSHW to decodetree, Richard Henderson, 2023/10/17
- [PATCH v2 26/90] target/sparc: Move WRPSR, SAVED, RESTORED to decodetree, Richard Henderson, 2023/10/17