[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 30/94] target/sparc: Remove cpu_wim
From: |
Richard Henderson |
Subject: |
[PULL 30/94] target/sparc: Remove cpu_wim |
Date: |
Wed, 25 Oct 2023 17:14:38 -0700 |
Use direct loads and stores to env instead.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sparc/translate.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index d87c08c18c..096cbb869f 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -84,9 +84,7 @@ static TCGv_i32 cpu_xcc, cpu_fprs;
static TCGv cpu_gsr;
static TCGv cpu_tick_cmpr, cpu_stick_cmpr, cpu_hstick_cmpr;
static TCGv cpu_hintp, cpu_htba, cpu_hver, cpu_ssr, cpu_ver;
-# define cpu_wim ({ qemu_build_not_reached(); (TCGv)NULL; })
#else
-static TCGv cpu_wim;
# define cpu_fprs ({ qemu_build_not_reached(); (TCGv)NULL; })
# define cpu_gsr ({ qemu_build_not_reached(); (TCGv)NULL; })
# define cpu_hintp ({ qemu_build_not_reached(); (TCGv)NULL; })
@@ -103,8 +101,10 @@ static TCGv_i64 cpu_fpr[TARGET_DPREGS];
#define env_field_offsetof(X) offsetof(CPUSPARCState, X)
#ifdef TARGET_SPARC64
+# define env32_field_offsetof(X) ({ qemu_build_not_reached(); 0; })
# define env64_field_offsetof(X) env_field_offsetof(X)
#else
+# define env32_field_offsetof(X) env_field_offsetof(X)
# define env64_field_offsetof(X) ({ qemu_build_not_reached(); 0; })
#endif
@@ -3414,7 +3414,8 @@ TRANS(RDHPR_hstick_cmpr, HYPV, do_rd_special,
hypervisor(dc), a->rd,
static TCGv do_rdwim(DisasContext *dc, TCGv dst)
{
- return cpu_wim;
+ tcg_gen_ld_tl(dst, tcg_env, env32_field_offsetof(wim));
+ return dst;
}
TRANS(RDWIM, 32, do_rd_special, supervisor(dc), a->rd, do_rdwim)
@@ -3767,7 +3768,10 @@ TRANS(WRPSR, 32, do_wr_special, a, supervisor(dc),
do_wrpsr)
static void do_wrwim(DisasContext *dc, TCGv src)
{
target_ulong mask = MAKE_64BIT_MASK(0, dc->def->nwindows);
- tcg_gen_andi_tl(cpu_wim, src, mask);
+ TCGv tmp = tcg_temp_new();
+
+ tcg_gen_andi_tl(tmp, src, mask);
+ tcg_gen_st_tl(tmp, tcg_env, env32_field_offsetof(wim));
}
TRANS(WRWIM, 32, do_wr_special, a, supervisor(dc), do_wrwim)
@@ -5939,8 +5943,6 @@ void sparc_tcg_init(void)
#ifdef TARGET_SPARC64
{ &cpu_xcc, offsetof(CPUSPARCState, xcc), "xcc" },
{ &cpu_fprs, offsetof(CPUSPARCState, fprs), "fprs" },
-#else
- { &cpu_wim, offsetof(CPUSPARCState, wim), "wim" },
#endif
{ &cpu_cc_op, offsetof(CPUSPARCState, cc_op), "cc_op" },
{ &cpu_psr, offsetof(CPUSPARCState, psr), "psr" },
--
2.34.1
- [PULL 37/94] target/sparc: Move SUBC to decodetree, (continued)
- [PULL 37/94] target/sparc: Move SUBC to decodetree, Richard Henderson, 2023/10/25
- [PULL 41/94] target/sparc: Move SLL, SRL, SRA to decodetree, Richard Henderson, 2023/10/25
- [PULL 23/94] target/sparc: Move RDPSR, RDHPR to decodetree, Richard Henderson, 2023/10/25
- [PATCH 29/29] target/alpha: Use TCG_COND_TSTNE for gen_fold_mzero, Richard Henderson, 2023/10/25
- [PATCH 26/29] tcg/tci: Support TCG_COND_TST{EQ,NE}, Richard Henderson, 2023/10/25
- [PULL 25/94] target/sparc: Move RDTBR, FLUSHW to decodetree, Richard Henderson, 2023/10/25
- [PULL 28/94] target/sparc: Move WRWIM, WRPR to decodetree, Richard Henderson, 2023/10/25
- [PATCH 24/29] tcg/ppc: Support TCG_COND_TST{EQ,NE}, Richard Henderson, 2023/10/25
- [PULL 31/94] target/sparc: Remove cpu_tick_cmpr, cpu_stick_cmpr, cpu_hstick_cmpr, Richard Henderson, 2023/10/25
- [PATCH 28/29] target/alpha: Use TCG_COND_TST{EQ,NE} for CMOVLB{C,S}, Richard Henderson, 2023/10/25
- [PULL 30/94] target/sparc: Remove cpu_wim,
Richard Henderson <=
- [PULL 35/94] target/sparc: Move MULX to decodetree, Richard Henderson, 2023/10/25
- [PULL 36/94] target/sparc: Move UMUL, SMUL to decodetree, Richard Henderson, 2023/10/25
- [PULL 39/94] target/sparc: Move UDIV, SDIV to decodetree, Richard Henderson, 2023/10/25
- [PULL 43/94] target/sparc: Move POPC to decodetree, Richard Henderson, 2023/10/25
- [PULL 44/94] target/sparc: Convert remaining v8 coproc insns to decodetree, Richard Henderson, 2023/10/25
- [PULL 46/94] target/sparc: Move FLUSH, SAVE, RESTORE to decodetree, Richard Henderson, 2023/10/25
- [PULL 38/94] target/sparc: Move UDIVX, SDIVX to decodetree, Richard Henderson, 2023/10/25
- [PULL 47/94] target/sparc: Move DONE, RETRY to decodetree, Richard Henderson, 2023/10/25
- [PULL 50/94] target/sparc: Split out ldst functions with asi pre-computed, Richard Henderson, 2023/10/25
- [PULL 27/94] target/sparc: Move WRPSR, SAVED, RESTORED to decodetree, Richard Henderson, 2023/10/25