[PATCH v4 88/90] target/sparc: Move FPACK16, FPACKFIX to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 2 ++ target/sparc/translate.c | 55 --- 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 781c3cd7f7..18a840709f 10064

[PATCH v4 87/90] target/sparc: Move FPCMP* to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 9 target/sparc/translate.c | 94 +-- 2 files changed, 50 insertions(+), 53 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index f197bb0b36..781c3cd7f7 100

[PATCH v4 12/90] target/sparc: Move BPcc and Bicc to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 ++ target/sparc/translate.c | 117 +++--- 2 files changed, 61 insertions(+), 60 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index a5f5d2681e..15cd975f4e 1006

[PATCH v4 90/90] target/sparc: Remove disas_sparc_legacy

2023-10-21 Thread Richard Henderson
All instructions are now converted. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 145 +-- 1 file changed, 1 insertion(+), 144 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index a3815619fe..d4468f6673 100644

[PATCH v4 74/90] target/sparc: Move gen_fop_DDD insns to decodetree

2023-10-21 Thread Richard Henderson
Move FADDd, FSUBd, FMULd, FDIVd. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 +++ target/sparc/translate.c | 55 --- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode

[PATCH v4 81/90] target/sparc: Move FqTOd, FqTOx to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 2 ++ target/sparc/translate.c | 49 +-- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 33f0c738e6..7b65b31f89 10064

[PATCH v4 40/90] target/sparc: Convert remaining v8 coproc insns to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 11 +++ target/sparc/translate.c | 32 ++-- 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index a596b0fc85..8de986f0bb 100

[PATCH v4 51/90] target/sparc: Move SWAP, SWAPA to decodetree

2023-10-21 Thread Richard Henderson
Remove gen_swap_asi. Rename gen_swap_asi0 to gen_swap_asi. Merge gen_swap into gen_swap_asi. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 +++ target/sparc/translate.c | 58 +-- 2 files changed, 29 insertions(+), 33 deletions(-) diff -

[PATCH v4 89/90] target/sparc: Convert FZERO, FONE to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 5 +++ target/sparc/translate.c | 69 +++ 2 files changed, 45 insertions(+), 29 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 18a840709f..0552f1447d 1006

[PATCH v4 15/90] target/sparc: Merge gen_cond with only caller

2023-10-21 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- 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 69e85b1842..2664db302d 100644 --- a/target/spar

[PATCH v4 68/90] target/sparc: Move PDIST to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 1 + target/sparc/translate.c | 41 +-- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 0e29629b5c..42d740ad44 100644

[PATCH v4 36/90] target/sparc: Move TADD, TSUB, MULS to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 7 ++ target/sparc/helper.c | 4 target/sparc/translate.c | 48 ++- 3 files changed, 29 insertions(+), 30 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.

[PATCH v4 21/90] target/sparc: Move RDASR, STBAR, MEMBAR to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 22 +++ target/sparc/translate.c | 356 -- 2 files changed, 249 insertions(+), 129 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 0517f5591b..1b084c5b97 1

[PATCH v4 86/90] target/sparc: Convert FCMP, FCMPE to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 7 ++ target/sparc/translate.c | 145 +++--- 2 files changed, 96 insertions(+), 56 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index d4487e326a..f197bb0b36 1006

[PATCH v4 61/90] target/sparc: Move ADDRALIGN* to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 +++ target/sparc/translate.c | 56 ++- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index b15ede5fd4..f70423895e 1006

[PATCH v4 75/90] target/sparc: Move gen_fop_QQQ insns to decodetree

2023-10-21 Thread Richard Henderson
Move FADDq, FSUBq, FMULq, FDIVq. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 +++ target/sparc/translate.c | 52 +++ 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode

[PATCH v4 78/90] target/sparc: Move gen_fop_FD insns to decodetree

2023-10-21 Thread Richard Henderson
Move FdTOs, FdTOi, FxTOs. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 +++ target/sparc/translate.c | 51 +-- 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index

[PATCH v4 43/90] target/sparc: Move DONE, RETRY to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 ++ target/sparc/translate.c | 99 +++ 2 files changed, 40 insertions(+), 62 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index aa90b5c5bb..137b7eb3c6 10064

[PATCH v4 44/90] target/sparc: Split out resolve_asi

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/translate.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 48e69389e5..9b1bd97947 100644 --- a/target/sparc/translate.c +++ b/target/sparc/tr

[PATCH v4 45/90] target/sparc: Drop ifdef around get_asi and friends

2023-10-21 Thread Richard Henderson
Mark some of the functions as unused, temporarily. Fix up some tl vs i64 issues revealed in the process. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 187 +++ 1 file changed, 70 insertions(+), 117 deletions(-) diff --git a/target/sparc/tran

[PATCH v4 71/90] target/sparc: Move gen_fop_DD insns to decodetree

2023-10-21 Thread Richard Henderson
Move FSQRTd, FxTOd, FdTOx. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 +++ target/sparc/translate.c | 50 +-- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index

[PATCH v4 42/90] target/sparc: Move FLUSH, SAVE, RESTORE to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 target/sparc/translate.c | 35 +-- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 271789ac13..aa90b5c5bb 100644

[PATCH v4 84/90] target/sparc: Move FMOVq, FNEGq, FABSq to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 + target/sparc/translate.c | 140 +- 2 files changed, 50 insertions(+), 93 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index e1f5394d17..807ed3f66f 10064

[PATCH v4 70/90] target/sparc: Move gen_fop_FF insns to decodetree

2023-10-21 Thread Richard Henderson
Move FSQRTs, FiTOs, FsTOi. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 +++ target/sparc/translate.c | 47 --- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index

[PATCH v4 08/90] target/sparc: Remove sparcv7 cpu features

2023-10-21 Thread Richard Henderson
The oldest supported cpu is the microsparc 1; all other cpus use CPU_DEFAULT_FEATURES. Remove the features that must always be present for sparcv7: FLOAT, SWAP, FLUSH, FSQRT, FMUL. Signed-off-by: Richard Henderson --- linux-user/sparc/target_syscall.h | 6 +- target/sparc/cpu.h

[PATCH v4 85/90] target/sparc: Move FMOVR, FMOVcc, FMOVfcc to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 12 +++ target/sparc/translate.c | 192 -- 2 files changed, 91 insertions(+), 113 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 807ed3f66f..d4487e326a 10

[PATCH v4 60/90] target/sparc: Move ARRAY* to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 +++ target/sparc/translate.c | 54 --- 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index a9630509bd..b15ede5fd4 1006

[PATCH v4 62/90] target/sparc: Move BMASK to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 2 ++ target/sparc/translate.c | 22 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index f70423895e..db372573a2 100644 --- a/target/spa

[PATCH v4 50/90] target/sparc: Move LDSTUB, LDSTUBA to decodetree

2023-10-21 Thread Richard Henderson
Remove gen_ldstub_asi. Rename gen_ldstub_asi0 to gen_ldstub_asi. Merge gen_ldstub into gen_ldstub_asi. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 target/sparc/translate.c | 46 +++ 2 files changed, 26 insertions(+), 24 deletions

[PATCH v4 35/90] target/sparc: Move UDIV, SDIV to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 2 ++ target/sparc/helper.c | 4 --- target/sparc/translate.c | 55 ++- 3 files changed, 28 insertions(+), 33 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decod

[PATCH v4 66/90] target/sparc: Move gen_ne_fop_FFF insns to decodetree

2023-10-21 Thread Richard Henderson
Move FANDNOT1s, FANDNOT2s, FANDs, FNANDs, FNORs, FORNOT1s, FORNOT2s, FORs, FPADD16s, FPADD32s, FPSUB16s, FPSUB32s, FXNORs, FXORs. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 16 ++ target/sparc/translate.c | 116 ++ 2 files changed,

[PATCH v4 54/90] target/sparc: Split out fp ldst functions with asi precomputed

2023-10-21 Thread Richard Henderson
Take the operation size from the MemOp instead of a separate parameter. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 138 +++ 1 file changed, 80 insertions(+), 58 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c

[PATCH v4 53/90] target/sparc: Move PREFETCH, PREFETCHA to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- 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

[PATCH v4 49/90] target/sparc: Move asi integer load/store to decodetree

2023-10-21 Thread Richard Henderson
Move LDDA, LDSBA, LDSHA, LDSWA, LDUBA, LDUHA, LDUWA, LDXA, STBA, STDA, STHA, STWA, STXA. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 31 + target/sparc/translate.c | 128 +- 2 files changed, 48 insertions(+), 111 deletions(-) di

[PATCH v4 48/90] target/sparc: Move simple integer load/store to decodetree

2023-10-21 Thread Richard Henderson
Move LDUW, LDUB, LDUH, LDD, LDSW, LDSB, LDSH, LDX, STW, STB, STH, STD, STX. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 22 + target/sparc/translate.c | 196 +++--- 2 files changed, 142 insertions(+), 76 deletions(-) diff --git a/target

[PATCH v4 39/90] target/sparc: Move POPC to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 +++ target/sparc/translate.c | 56 +++ 2 files changed, 12 insertions(+), 47 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index cb21405e1a..a596b0fc85 1006

[PATCH v4 63/90] target/sparc: Move FMOVS, FNEGS, FABSS, FSRC*S, FNOT*S to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 13 ++ target/sparc/translate.c | 92 +-- 2 files changed, 62 insertions(+), 43 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index db372573a2..669a54e297 1

[PATCH v4 76/90] target/sparc: Move FSMULD to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 1 + target/sparc/translate.c | 43 +-- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index f18fd99476..6817d52ca2 100644

[PATCH v4 06/90] target/sparc: Define features via cpu-feature.h.inc

2023-10-21 Thread Richard Henderson
Manage feature bits automatically. Signed-off-by: Richard Henderson --- target/sparc/cpu.h | 32 +--- target/sparc/cpu-feature.h.inc | 19 +++ 2 files changed, 32 insertions(+), 19 deletions(-) create mode 100644 target/sparc/cpu-feature.h

[PATCH v4 52/90] target/sparc: Move CASA, CASXA to decodetree

2023-10-21 Thread Richard Henderson
Remove gen_cas_asi, gen_casx_asi. Rename gen_cas_asi0 to gen_cas_asi. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 7 target/sparc/translate.c | 71 +++ 2 files changed, 35 insertions(+), 43 deletions(-) diff --git a/target/sparc/in

[PATCH v4 72/90] target/sparc: Move FSQRTq to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 1 + target/sparc/translate.c | 39 +++ 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 1d766fab21..4cb250265d 100644

[PATCH v4 83/90] target/sparc: Move FdTOq, FxTOq to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 2 ++ target/sparc/translate.c | 47 ++- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index c76e603f2d..e1f5394d17 10064

[PATCH v4 47/90] target/sparc: Use tcg_gen_qemu_{ld, st}_i128 for GET_ASI_DTWINX

2023-10-21 Thread Richard Henderson
Perform one atomic 16-byte operation. The atomicity is required for the LDTXA instructions. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 48 +--- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/target/sparc/translate.c b/targe

[PATCH v4 37/90] target/sparc: Move SLL, SRL, SRA to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 14 +++ target/sparc/translate.c | 182 -- 2 files changed, 92 insertions(+), 104 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index b35921aabb..51cddc826d 10

[PATCH v4 65/90] target/sparc: Use tcg_gen_vec_{add,sub}*

2023-10-21 Thread Richard Henderson
Replace the local helpers for the same integer operations. Signed-off-by: Richard Henderson --- target/sparc/helper.h | 12 target/sparc/translate.c | 15 +- target/sparc/vis_helper.c | 59 --- 3 files changed, 7 insertions(+), 79 deletio

[PATCH v4 69/90] target/sparc: Move gen_gsr_fop_DDD insns to decodetree

2023-10-21 Thread Richard Henderson
Move FPACK32, FALIGNDATA, BSHUFFLE. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 ++ target/sparc/translate.c | 101 -- 2 files changed, 55 insertions(+), 49 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.dec

[PATCH v4 80/90] target/sparc: Move FqTOs, FqTOi to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 2 ++ target/sparc/translate.c | 48 +-- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index ee9262061b..33f0c738e6 10064

[PATCH v4 64/90] target/sparc: Move FMOVD, FNEGD, FABSD, FSRC*D, FNOT*D to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 7 +++ target/sparc/translate.c | 91 +-- 2 files changed, 56 insertions(+), 42 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 669a54e297..23a21f2c20 1006

[PATCH v4 55/90] target/sparc: Move simple fp load/store to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 19 target/sparc/translate.c | 194 ++ 2 files changed, 113 insertions(+), 100 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index aa452f1d00..1150890e44

[PATCH v4 73/90] target/sparc: Move gen_fop_FFF insns to decodetree

2023-10-21 Thread Richard Henderson
Move FADDs, FSUBs, FMULs, FDIVs. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 +++ target/sparc/translate.c | 54 +++ 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode

[PATCH v4 29/90] target/sparc: Move basic arithmetic to decodetree

2023-10-21 Thread Richard Henderson
Move ADD, AND, OR, XOR, SUB, ANDN, ORN, XORN. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 12 +++ target/sparc/translate.c | 178 -- 2 files changed, 87 insertions(+), 103 deletions(-) diff --git a/target/sparc/insns.decode b/target/spa

[PATCH v4 82/90] target/sparc: Move FiTOq, FsTOq to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 2 ++ target/sparc/translate.c | 44 +-- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 7b65b31f89..c76e603f2d 10064

[PATCH v4 79/90] target/sparc: Move FiTOd, FsTOd, FsTOx to decodetree

2023-10-21 Thread Richard Henderson
Note that gen_ne_fop_DF was incorrectly named and does pass env. The two sets of helpers should have been unified. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 ++ target/sparc/translate.c | 67 --- 2 files changed, 30 insertions(+), 40

[PATCH v4 77/90] target/sparc: Move FDMULQ to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 1 + target/sparc/translate.c | 41 +-- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 6817d52ca2..a19d191603 100644

[PATCH v4 67/90] target/sparc: Move gen_ne_fop_DDD insns to decodetree

2023-10-21 Thread Richard Henderson
Move FMUL8x16, FMUL8x16AU, FMUL8x16AL, FMUL8SUx16, FMUL8ULx16, FMULD8SUx16, FMULD8ULx16, FPMERGE, FEXPAND, FANDNOT1d, FANDNOT2d, FANDd, FNANDd, FNORd, FORNOT1d, FORNOT2d, FORd, FPADD16d, FPADD32d, FPSUB16d, FPSUB32d, FXNORd, FXORd. Signed-off-by: Richard Henderson --- target/sparc/insns.decode |

[PATCH v4 56/90] target/sparc: Move asi fp load/store to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 51 +-- target/sparc/translate.c | 173 -- 2 files changed, 81 insertions(+), 143 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 1150890e44..45eb6

[PATCH v4 38/90] target/sparc: Move MOVcc, MOVR to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 ++ target/sparc/translate.c | 116 -- 2 files changed, 64 insertions(+), 56 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 51cddc826d..cb21405e1a 1006

[PATCH v4 27/90] target/sparc: Move WRWIM, WRPR to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 21 +++ target/sparc/translate.c | 350 +++--- 2 files changed, 235 insertions(+), 136 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 45cf47a32f..f478999ee1 1

[PATCH v4 59/90] target/sparc: Move EDGE* to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 22 +++- target/sparc/translate.c | 269 -- 2 files changed, 131 insertions(+), 160 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 5df3b1add4..a9630509bd

[PATCH v4 13/90] target/sparc: Move BPr to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 ++ target/sparc/translate.c | 63 ++- 2 files changed, 25 insertions(+), 41 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 15cd975f4e..838f4cdb1d 10064

[PATCH v4 46/90] target/sparc: Split out ldst functions with asi pre-computed

2023-10-21 Thread Richard Henderson
As an intermediate step in decodetree conversion, create new functions passing in DisasASI and not insn. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 215 ++- 1 file changed, 123 insertions(+), 92 deletions(-) diff --git a/target/sparc/tran

[PATCH v4 05/90] configs: Enable MTTCG for sparc, sparc64

2023-10-21 Thread Richard Henderson
This will be of small comfort to sparc64, because both sun4u and sun4v board models force max_cpus = 1. But it does enable actual smp for sparc32 sun4m. Signed-off-by: Richard Henderson --- configs/targets/sparc-softmmu.mak | 1 + configs/targets/sparc64-softmmu.mak | 1 + 2 files changed, 2 i

[PATCH v4 31/90] target/sparc: Move MULX to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 +++ target/sparc/translate.c | 6 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 1cff18fa1f..1a04a8e229 100644 --- a/target/sparc/insns.decode ++

[PATCH v4 57/90] target/sparc: Move LDFSR, STFSR to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 + target/sparc/translate.c | 152 +++--- 2 files changed, 64 insertions(+), 92 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 45eb6a967f..5df3b1add4 10064

[PATCH v4 24/90] target/sparc: Move RDTBR, FLUSHW to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- 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/targe

[PATCH v4 10/90] target/sparc: Define AM_CHECK for sparc32

2023-10-21 Thread Richard Henderson
Define as false, which allows some ifdef removal. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 080bc5f8a2..9eb2b7e52f 100644 --- a

[PATCH v4 03/90] target/sparc: Avoid helper_raise_exception in helper_st_asi

2023-10-21 Thread Richard Henderson
Always use cpu_raise_exception_ra with GETPC for unwind. Signed-off-by: Richard Henderson --- target/sparc/ldst_helper.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index 246de86c98..09066d5487 100644 ---

[PATCH v4 25/90] target/sparc: Move WRASR to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 31 target/sparc/translate.c | 353 +- 2 files changed, 225 insertions(+), 159 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 0b6f4c9c38..118f0f1f17

[PATCH v4 32/90] target/sparc: Move UMUL, SMUL to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 2 ++ target/sparc/translate.c | 21 +++-- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 1a04a8e229..d6a7256e71 100644 --- a/target/spar

[PATCH v4 58/90] target/sparc: Merge LDFSR, LDXFSR implementations

2023-10-21 Thread Richard Henderson
Combine the helper to a single set_fsr(). Perform the mask and merge inline. Signed-off-by: Richard Henderson --- target/sparc/helper.h | 3 +-- target/sparc/fop_helper.c | 17 ++-- target/sparc/translate.c | 42 --- 3 files changed, 16 inser

[PATCH v4 41/90] target/sparc: Move JMPL, RETT, RETURN to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 7 +++ target/sparc/translate.c | 126 -- 2 files changed, 88 insertions(+), 45 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 8de986f0bb..271789ac13 100

[PATCH v4 28/90] target/sparc: Move WRTBR, WRHPR to decodetree

2023-10-21 Thread Richard Henderson
Implement htstate in the obvious way. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 9 +++ target/sparc/translate.c | 130 ++ 2 files changed, 85 insertions(+), 54 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.

[PATCH v4 01/90] target/sparc: Clear may_lookup for npc == DYNAMIC_PC

2023-10-21 Thread Richard Henderson
With pairs of jmp+rett, pc == DYNAMIC_PC_LOOKUP and npc == DYNAMIC_PC. Make sure that we exit for interrupts. Cc: qemu-sta...@nongnu.org Fixes: 633c42834c7 ("target/sparc: Introduce DYNAMIC_PC_LOOKUP") Tested-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/translate.c |

[PATCH v4 26/90] target/sparc: Move WRPSR, SAVED, RESTORED to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 10 +++ target/sparc/translate.c | 61 ++- 2 files changed, 38 insertions(+), 33 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 118f0f1f17..45cf47a32f

[PATCH v4 18/90] target/sparc: Pass DisasCompare to advance_jump_cond

2023-10-21 Thread Richard Henderson
Fold the condition into the branch or movcond when possible. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 31 +-- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 503598ed93..d

[PATCH v4 22/90] target/sparc: Move RDPSR, RDHPR to decodetree

2023-10-21 Thread Richard Henderson
Implement htstate in the obvious way. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 10 +++ target/sparc/translate.c | 133 ++ 2 files changed, 101 insertions(+), 42 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns

[PATCH v4 23/90] target/sparc: Move RDWIM, RDPR to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 22 +++ target/sparc/translate.c | 360 +++--- 2 files changed, 244 insertions(+), 138 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index a7d78eb6c6..7d91a7bc83 1

[PATCH v4 16/90] target/sparc: Merge gen_fcond with only caller

2023-10-21 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- 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 2664db302d..b8d51d6d64 100644 --- a/target/sparc

[PATCH v4 11/90] target/sparc: Move CALL to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 1 + target/sparc/translate.c | 34 +- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 5811a679db..a5f5d2681e 100644 ---

[PATCH v4 30/90] target/sparc: Move ADDC to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 1 + target/sparc/translate.c | 162 -- 2 files changed, 105 insertions(+), 58 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 3271c2997d..1cff18fa1f 1006

[PATCH v4 07/90] target/sparc: Use CPU_FEATURE_BIT_* for cpu properties

2023-10-21 Thread Richard Henderson
Use symbols not integer constants for the bit positions. Signed-off-by: Richard Henderson --- target/sparc/cpu.c | 42 -- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 8ba96ae225..e4d1c552e5 1

[PATCH v4 33/90] target/sparc: Move SUBC to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 1 + target/sparc/translate.c | 147 +- 2 files changed, 98 insertions(+), 50 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index d6a7256e71..a188452d2e 10064

[PATCH v4 14/90] target/sparc: Move FBPfcc and FBfcc to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 ++ target/sparc/translate.c | 102 +++--- 2 files changed, 43 insertions(+), 63 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 838f4cdb1d..9ab3f2eb82 1006

[PATCH v4 00/90] target/sparc: Convert to decodetree

2023-10-21 Thread Richard Henderson
Changes for v4: * Implement htstate for RDHPR, WRHPR. This was the issue with sun4v rom, "wrhpr %g0, %htstate". Previously we "implemented" this with nop. But since we have env->htstate[], add the obvious implementation. * The fp asi reorg got lost with "sizes", one of which was fo

[PATCH v4 19/90] target/sparc: Move SETHI to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 6 + target/sparc/translate.c | 50 --- 2 files changed, 21 insertions(+), 35 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 9ab3f2eb82..f6f5401b10 10

[PATCH v4 09/90] target/sparc: Add decodetree infrastructure

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 5 +++ target/sparc/translate.c | 69 ++- target/sparc/meson.build | 3 ++ 3 files changed, 55 insertions(+), 22 deletions(-) create mode 100644 target/sparc/insns.decode diff --git a/target

[PATCH v4 34/90] target/sparc: Move UDIVX, SDIVX to decodetree

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 +++ target/sparc/translate.c | 23 ++- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index a188452d2e..dd0ed3a993 100644 --- a/target/s

[PATCH v4 02/90] target/sparc: Implement check_align inline

2023-10-21 Thread Richard Henderson
Emit the exception at the end of the translation block, so that the non-exception case can fall through. Signed-off-by: Richard Henderson --- target/sparc/helper.h | 1 - target/sparc/ldst_helper.c | 7 ++-- target/sparc/translate.c | 68 +- 3 files c

[PATCH v4 17/90] target/sparc: Merge gen_branch_[an] with only caller

2023-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/translate.c | 73 +--- 1 file changed, 30 insertions(+), 43 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index b8d51d6d64..503598ed93 100644 --- a/target/sparc/translate.c +++ b

[PATCH v4 20/90] target/sparc: Move Tcc to decodetree

2023-10-21 Thread Richard Henderson
Use the new delay_exceptionv function in the implementation. Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 13 target/sparc/translate.c | 155 +++--- 2 files changed, 89 insertions(+), 79 deletions(-) diff --git a/target/sparc/insns.deco

[PATCH v4 04/90] target/sparc: Set TCG_GUEST_DEFAULT_MO

2023-10-21 Thread Richard Henderson
Always use TSO, per the Oracle 2015 manual. This is slightly less restrictive than the TCG_MO_ALL default, and happens to match the i386 model, which will eliminate a few extra barriers on that host. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/sparc/cpu.h | 2

Re: [PATCH 7/7] target/xtensa: Use tcg_gen_sextract_i32

2023-10-21 Thread Max Filippov
On Thu, Oct 19, 2023 at 11:29 AM Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/xtensa/translate.c | 12 +--- > 1 file changed, 1 insertion(+), 11 deletions(-) Reviewed-by: Max Filippov -- Thanks. -- Max

[PATCH v4 1/3] vdpa: Add SetSteeringEBPF method for NetClientState

2023-10-21 Thread Hawkins Jiawei
At present, to enable the VIRTIO_NET_F_RSS feature, eBPF must be loaded for the vhost backend. Given that vhost-vdpa is one of the vhost backend, we need to implement the SetSteeringEBPF method to support RSS for vhost-vdpa, even if vhost-vdpa calculates the rss hash in the hardware device instead

[PATCH v4 0/3] Vhost-vdpa Shadow Virtqueue RSS Support

2023-10-21 Thread Hawkins Jiawei
This series enables shadowed CVQ to intercept RSS command through shadowed CVQ, update the virtio NIC device model so qemu send it in a migration, and the restore of that RSS state in the destination. Note that this patch should be based on patch "Vhost-vdpa Shadow Virtqueue Hash calculation Suppo

[PATCH v4 2/3] vdpa: Restore receive-side scaling state

2023-10-21 Thread Hawkins Jiawei
This patch reuses vhost_vdpa_net_load_rss() with some refactorings to restore the receive-side scaling state at device's startup. Signed-off-by: Hawkins Jiawei --- v4: - add do_rss argument and relative code in vhost_vdpa_net_load_rss() v3: https://lore.kernel.org/all/47b17e160ba4e55b24790b7d

[PATCH v4 3/3] vdpa: Allow VIRTIO_NET_F_RSS in SVQ

2023-10-21 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_RSS feature. Signed-off-by: Hawkins Jiawei --- v4: no code changes v3: https://lore.kernel.org/all/2d2a378291bfac4144a0c0c473cf80415bb580b3.1693299194.git.yin31...@gmail.com/ net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/n

[PATCH v3 1/2] vdpa: Restore hash calculation state

2023-10-21 Thread Hawkins Jiawei
This patch introduces vhost_vdpa_net_load_rss() to restore the hash calculation state at device's startup. Signed-off-by: Hawkins Jiawei --- v3: - remove the `do_rss` argument in vhost_vdpa_net_load_rss() - zero reserved fields in "cfg" manually instead of using memset() to prevent compiler "

[PATCH v3 0/2] Vhost-vdpa Shadow Virtqueue Hash calculation Support

2023-10-21 Thread Hawkins Jiawei
This series enables shadowed CVQ to intercept VIRTIO_NET_CTRL_MQ_HASH_CONFIG command through shadowed CVQ, update the virtio NIC device model so qemu send it in a migration, and the restore of that Hash calculation state in the destination. ChangeLog = v3: - remove the `do_rss` argument

[PATCH v3 2/2] vdpa: Allow VIRTIO_NET_F_HASH_REPORT in SVQ

2023-10-21 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_HASH_REPORT feature. Signed-off-by: Hawkins Jiawei --- v3: no code changes v2: https://lore.kernel.org/all/a67d4abc2c8c5c7636addc729daa5432fa8193bd.1693297766.git.yin31...@gmail.com/ net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vd

Re: [PATCH 3/7] target/i386: Use tcg_gen_ext_tl

2023-10-21 Thread Richard Henderson
On 10/21/23 00:59, Paolo Bonzini wrote: On 10/19/23 23:57, Philippe Mathieu-Daudé wrote: On 19/10/23 20:29, Richard Henderson wrote: -    default: +    if (memop_size(size) == TARGET_LONG_BITS) {   return src;   } Any opinions about adding something like this on top?

  1   2   >