[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 25/94] target/sparc: Move RDTBR, FLUSHW to decodetree
|
From: |
Richard Henderson |
|
Subject: |
[PULL 25/94] target/sparc: Move RDTBR, FLUSHW to decodetree |
|
Date: |
Wed, 25 Oct 2023 17:14:28 -0700 |
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sparc/insns.decode | 5 +++++
target/sparc/translate.c | 23 +++++++++++------------
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode
index 7d91a7bc83..0b6f4c9c38 100644
--- a/target/sparc/insns.decode
+++ b/target/sparc/insns.decode
@@ -76,6 +76,11 @@ RDPR_gl 10 rd:5 101010 10000 0 0000000000000
RDPR_strand_status 10 rd:5 101010 11010 0 0000000000000
RDPR_ver 10 rd:5 101010 11111 0 0000000000000
+{
+ FLUSHW 10 00000 101011 00000 0 0000000000000
+ RDTBR 10 rd:5 101011 00000 0 0000000000000
+}
+
Tcc_r 10 0 cond:4 111010 rs1:5 0 cc:1 0000000 rs2:5
{
# For v7, the entire simm13 field is present, but masked to 7 bits.
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 6e415d7070..67d3292e68 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -39,6 +39,7 @@
#ifdef TARGET_SPARC64
# define gen_helper_rdpsr(D, E) qemu_build_not_reached()
#else
+# define gen_helper_flushw(E) qemu_build_not_reached()
# define gen_helper_rdccr(D, E) qemu_build_not_reached()
# define gen_helper_rdcwp(D, E) qemu_build_not_reached()
# define gen_helper_tick_get_count(D, E, T, C) qemu_build_not_reached()
@@ -3464,6 +3465,7 @@ static TCGv do_rdtba(DisasContext *dc, TCGv dst)
return cpu_tbr;
}
+TRANS(RDTBR, 32, do_rd_special, supervisor(dc), a->rd, do_rdtba)
TRANS(RDPR_tba, 64, do_rd_special, supervisor(dc), a->rd, do_rdtba)
static TCGv do_rdpstate(DisasContext *dc, TCGv dst)
@@ -3562,6 +3564,15 @@ static TCGv do_rdver(DisasContext *dc, TCGv dst)
TRANS(RDPR_ver, 64, do_rd_special, supervisor(dc), a->rd, do_rdver)
+static bool trans_FLUSHW(DisasContext *dc, arg_FLUSHW *a)
+{
+ if (avail_64(dc)) {
+ gen_helper_flushw(tcg_env);
+ return advance_pc(dc);
+ }
+ return false;
+}
+
#define CHECK_IU_FEATURE(dc, FEATURE) \
if (!((dc)->def->features & CPU_FEATURE_ ## FEATURE)) \
goto illegal_insn;
@@ -3592,18 +3603,6 @@ static void disas_sparc_legacy(DisasContext *dc,
unsigned int insn)
TCGv cpu_dst __attribute__((unused)) = tcg_temp_new();
TCGv cpu_tmp0 __attribute__((unused));
-#if defined(TARGET_SPARC64) || !defined(CONFIG_USER_ONLY)
- if (xop == 0x2b) { /* rdtbr / V9 flushw */
-#ifdef TARGET_SPARC64
- gen_helper_flushw(tcg_env);
-#else
- if (!supervisor(dc))
- goto priv_insn;
- gen_store_gpr(dc, rd, cpu_tbr);
-#endif
- break;
- }
-#endif
if (xop == 0x34) { /* FPU Operations */
if (gen_trap_ifnofpu(dc)) {
goto jmp_insn;
--
2.34.1
- [PULL 22/94] target/sparc: Move RDASR, STBAR, MEMBAR to decodetree, (continued)
- [PULL 22/94] target/sparc: Move RDASR, STBAR, MEMBAR to decodetree, Richard Henderson, 2023/10/25
- [PULL 24/94] target/sparc: Move RDWIM, RDPR to decodetree, Richard Henderson, 2023/10/25
- [PATCH 21/29] tcg/ppc: Sink tcg_to_bc usage into tcg_out_bc, Richard Henderson, 2023/10/25
- [PULL 26/94] target/sparc: Move WRASR to decodetree, Richard Henderson, 2023/10/25
- [PULL 34/94] target/sparc: Move ADDC to decodetree, Richard Henderson, 2023/10/25
- [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 <=
- [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, 2023/10/25
- [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