[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/85] target/sparc: Merge gen_cond with only caller
From: |
Richard Henderson |
Subject: |
[PATCH 10/85] target/sparc: Merge gen_cond with only caller |
Date: |
Fri, 13 Oct 2023 14:27:31 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sparc/translate.c | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 8c15ca08c4..1ac3bdd03f 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -1265,20 +1265,6 @@ static void gen_fcompare(DisasCompare *cmp, unsigned int
cc, unsigned int cond)
}
}
-static void gen_cond(TCGv r_dst, unsigned int cc, unsigned int cond,
- DisasContext *dc)
-{
- DisasCompare cmp;
- gen_compare(&cmp, cc, cond, dc);
-
- /* 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);
- }
-}
-
static void gen_fcond(TCGv r_dst, unsigned int cc, unsigned int cond)
{
DisasCompare cmp;
@@ -2936,6 +2922,7 @@ static bool advance_jump_cond(DisasContext *dc, bool
annul, target_ulong dest)
static bool do_bpcc(DisasContext *dc, arg_bcc *a)
{
target_long target = dc->pc + a->i * 4;
+ DisasCompare cmp;
if (unlikely(AM_CHECK(dc))) {
target &= 0xffffffffULL;
@@ -2947,7 +2934,13 @@ static bool do_bpcc(DisasContext *dc, arg_bcc *a)
return advance_jump_uncond_always(dc, a->a, target);
default:
flush_cond(dc);
- gen_cond(cpu_cond, a->cc, a->cond, dc);
+
+ gen_compare(&cmp, a->cc, a->cond, dc);
+ 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 01/85] target/sparc: Set TCG_GUEST_DEFAULT_MO, (continued)
- [PATCH 01/85] target/sparc: Set TCG_GUEST_DEFAULT_MO, Richard Henderson, 2023/10/13
- [PATCH 02/85] configs: Enable MTTCG for sparc, sparc64, Richard Henderson, 2023/10/13
- [PATCH 03/85] target/sparc: Remove always-set cpu features, Richard Henderson, 2023/10/13
- [PATCH 04/85] target/sparc: Add decodetree infrastructure, Richard Henderson, 2023/10/13
- [PATCH 05/85] target/sparc: Define AM_CHECK for sparc32, Richard Henderson, 2023/10/13
- [PATCH 06/85] target/sparc: Move CALL to decodetree, Richard Henderson, 2023/10/13
- [PATCH 08/85] target/sparc: Move BPr to decodetree, Richard Henderson, 2023/10/13
- [PATCH 09/85] target/sparc: Move FBPfcc and FBfcc to decodetree, Richard Henderson, 2023/10/13
- [PATCH 10/85] target/sparc: Merge gen_cond with only caller,
Richard Henderson <=
- [PATCH 07/85] target/sparc: Move BPcc and Bicc to decodetree, Richard Henderson, 2023/10/13
- [PATCH 11/85] target/sparc: Merge gen_fcond with only caller, Richard Henderson, 2023/10/13
- [PATCH 12/85] target/sparc: Merge gen_branch_[an] with only caller, Richard Henderson, 2023/10/13
- [PATCH 13/85] target/sparc: Pass DisasCompare to advance_jump_cond, Richard Henderson, 2023/10/13
- [PATCH 14/85] target/sparc: Move SETHI to decodetree, Richard Henderson, 2023/10/13
- [PATCH 15/85] target/sparc: Move Tcc to decodetree, Richard Henderson, 2023/10/13
- [PATCH 16/85] target/sparc: Move RDASR, STBAR, MEMBAR to decodetree, Richard Henderson, 2023/10/13
- [PATCH 18/85] target/sparc: Move RDWIM, RDPR to decodetree, Richard Henderson, 2023/10/13