[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 53/90] target/sparc: Move PREFETCH, PREFETCHA to decodetree
From: |
Richard Henderson |
Subject: |
[PATCH v4 53/90] target/sparc: Move PREFETCH, PREFETCHA to decodetree |
Date: |
Sat, 21 Oct 2023 22:59:54 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sparc/insns.decode | 8 ++++++--
target/sparc/translate.c | 14 ++++++++++----
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode
index 82c484fbc7..aa452f1d00 100644
--- a/target/sparc/insns.decode
+++ b/target/sparc/insns.decode
@@ -231,6 +231,9 @@ RESTORE 10 ..... 111101 ..... . .............
@r_r_ri
DONE 10 00000 111110 00000 0 0000000000000
RETRY 10 00001 111110 00000 0 0000000000000
+NCP 10 ----- 110110 ----- --------- ----- # v8 CPop1
+NCP 10 ----- 110111 ----- --------- ----- # v8 CPop2
+
##
## Major Opcode 11 -- load and store instructions
##
@@ -299,8 +302,9 @@ CASA 11 ..... 111100 ..... . .............
@casa_imm
CASXA 11 ..... 111110 ..... . ............. @r_r_r_asi
CASXA 11 ..... 111110 ..... . ............. @casa_imm
-NCP 10 ----- 110110 ----- --------- ----- # v8 CPop1
-NCP 10 ----- 110111 ----- --------- ----- # v8 CPop2
+NOP_v9 11 ----- 101101 ----- 0 00000000 ----- # PREFETCH
+NOP_v9 11 ----- 101101 ----- 1 ------------- # PREFETCH
+NOP_v9 11 ----- 111101 ----- - ------------- # PREFETCHA
NCP 11 ----- 110000 ----- --------- ----- # v8 LDC
NCP 11 ----- 110001 ----- --------- ----- # v8 LDCSR
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index c5dd9e6dd6..07bd3c123a 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -4176,6 +4176,14 @@ static bool trans_NOP_v7(DisasContext *dc, arg_NOP_v7 *a)
return false;
}
+static bool trans_NOP_v9(DisasContext *dc, arg_NOP_v9 *a)
+{
+ if (avail_64(dc)) {
+ return advance_pc(dc);
+ }
+ return false;
+}
+
static bool do_arith(DisasContext *dc, arg_r_r_ri_cc *a, int cc_op,
void (*func)(TCGv, TCGv, TCGv),
void (*funci)(TCGv, TCGv, target_long))
@@ -5609,10 +5617,10 @@ static void disas_sparc_legacy(DisasContext *dc,
unsigned int insn)
case 0x0b: /* V9 ldx */
case 0x18: /* V9 ldswa */
case 0x1b: /* V9 ldxa */
+ case 0x2d: /* V9 prefetch */
+ case 0x3d: /* V9 prefetcha */
goto illegal_insn; /* in decodetree */
#ifdef TARGET_SPARC64
- case 0x2d: /* V9 prefetch, no effect */
- goto skip_move;
case 0x30: /* V9 ldfa */
if (gen_trap_ifnofpu(dc)) {
goto jmp_insn;
@@ -5627,8 +5635,6 @@ static void disas_sparc_legacy(DisasContext *dc, unsigned
int insn)
gen_ldf_asi(dc, cpu_addr, insn, 8, DFPREG(rd));
gen_update_fprs_dirty(dc, DFPREG(rd));
goto skip_move;
- case 0x3d: /* V9 prefetcha, no effect */
- goto skip_move;
case 0x32: /* V9 ldqfa */
CHECK_FPU_FEATURE(dc, FLOAT128);
if (gen_trap_ifnofpu(dc)) {
--
2.34.1
- [PATCH v4 60/90] target/sparc: Move ARRAY* to decodetree, (continued)
- [PATCH v4 60/90] target/sparc: Move ARRAY* to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 70/90] target/sparc: Move gen_fop_FF insns to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 57/90] target/sparc: Move LDFSR, STFSR to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 72/90] target/sparc: Move FSQRTq to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 77/90] target/sparc: Move FDMULQ to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 73/90] target/sparc: Move gen_fop_FFF insns to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 69/90] target/sparc: Move gen_gsr_fop_DDD insns to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 76/90] target/sparc: Move FSMULD to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 68/90] target/sparc: Move PDIST to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 54/90] target/sparc: Split out fp ldst functions with asi precomputed, Richard Henderson, 2023/10/22
- [PATCH v4 53/90] target/sparc: Move PREFETCH, PREFETCHA to decodetree,
Richard Henderson <=
- [PATCH v4 61/90] target/sparc: Move ADDRALIGN* to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 59/90] target/sparc: Move EDGE* to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 64/90] target/sparc: Move FMOVD, FNEGD, FABSD, FSRC*D, FNOT*D to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 75/90] target/sparc: Move gen_fop_QQQ insns to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 63/90] target/sparc: Move FMOVS, FNEGS, FABSS, FSRC*S, FNOT*S to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 67/90] target/sparc: Move gen_ne_fop_DDD insns to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 71/90] target/sparc: Move gen_fop_DD insns to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 74/90] target/sparc: Move gen_fop_DDD insns to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 78/90] target/sparc: Move gen_fop_FD insns to decodetree, Richard Henderson, 2023/10/22
- [PATCH v4 79/90] target/sparc: Move FiTOd, FsTOd, FsTOx to decodetree, Richard Henderson, 2023/10/22