c8507ebf74
target/sparc: Change DisasCompare.c2 to int
...
We don't require c2 to be variable, so emphasize that.
We don't currently require c2 to be non-zero, but that will change.
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 >
2023-11-05 12:03:29 -08:00
dd7dbfcc00
target/sparc: Remove DisasCompare.is_bool
...
Since we're going to feed cpu_cond to another comparison, we don't
reqire a boolean value -- anything non-zero is sufficient.
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 >
2023-11-05 12:03:23 -08:00
b597eedcce
target/sparc: Remove CC_OP leftovers
...
All instructions have been converted to generate
full condition codes explicitly.
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 >
2023-11-05 12:03:17 -08:00
68524e83f8
target/sparc: Remove CC_OP_TADDTV, CC_OP_TSUBTV
...
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 >
2023-11-05 12:03:14 -08:00
f828df7443
target/sparc: Remove CC_OP_SUB, CC_OP_SUBX, CC_OP_TSUB
...
These are all related and implementable with common code.
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 >
2023-11-05 12:03:11 -08:00
b989ce736e
target/sparc: Remove CC_OP_ADD, CC_OP_ADDX, CC_OP_TADD
...
These are all related and implementable with common code.
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 >
2023-11-05 12:02:59 -08:00
1326010322
target/sparc: Remove CC_OP_DIV
...
Return both result and overflow from helper_[us]div.
Compute all flags explicitly in gen_op_[us]divcc.
Marginally improve the INT64_MIN special case in helper_sdiv.
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 >
2023-11-05 11:53:36 -08:00
2a45b73658
target/sparc: Remove CC_OP_LOGIC
...
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 >
2023-11-05 11:53:32 -08:00
2a1905c79e
target/sparc: Split psr and xcc into components
...
Step in removing CC_OP: change the representation of CC_OP_FLAGS.
The 8 bits are distributed between 6 variables, which should make
it easy to keep up to date.
The code within cc_helper.c is quite ugly but is only temporary.
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 >
2023-11-05 11:53:13 -08:00
b1fa27fcc8
target/sparc: Introduce cpu_put_psr_icc
...
Isolate linux-user from changes to icc representation.
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 >
2023-11-05 11:52:18 -08:00
ba9c09b40b
target/sparc: Remove disas_sparc_legacy
...
All instructions are now converted.
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 >
2023-10-25 01:01:13 -07:00
3a38260e3c
target/sparc: Convert FZERO, FONE to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
2f72264169
target/sparc: Move FPACK16, FPACKFIX to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
e2fa6bd1ad
target/sparc: Move FPCMP* to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
40f9ad219b
target/sparc: Convert FCMP, FCMPE to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
f7ec8155f5
target/sparc: Move FMOVR, FMOVcc, FMOVfcc to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
f4e18df576
target/sparc: Move FMOVq, FNEGq, FABSq to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
7b8e3e1a87
target/sparc: Move FdTOq, FxTOq to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
13ebcc7749
target/sparc: Move FiTOq, FsTOq to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
1617586f5a
target/sparc: Move FqTOd, FqTOx to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
bd9c5c428f
target/sparc: Move FqTOs, FqTOi to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
199d43efb1
target/sparc: Move FiTOd, FsTOd, FsTOx to decodetree
...
Note that gen_ne_fop_DF was incorrectly named and does pass env.
The two sets of helpers should have been unified.
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 >
2023-10-25 01:01:13 -07:00
8c94bcd850
target/sparc: Move gen_fop_FD insns to decodetree
...
Move FdTOs, FdTOi, FxTOs.
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 >
2023-10-25 01:01:13 -07:00
5e3b17bbe9
target/sparc: Move FDMULQ to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
ff4c711b8d
target/sparc: Move FSMULD to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
a405623991
target/sparc: Move gen_fop_QQQ insns to decodetree
...
Move FADDq, FSUBq, FMULq, FDIVq.
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 >
2023-10-25 01:01:13 -07:00
f2a59b0ad7
target/sparc: Move gen_fop_DDD insns to decodetree
...
Move FADDd, FSUBd, FMULd, FDIVd.
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 >
2023-10-25 01:01:13 -07:00
c1514961e6
target/sparc: Move gen_fop_FFF insns to decodetree
...
Move FADDs, FSUBs, FMULs, FDIVs.
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 >
2023-10-25 01:01:13 -07:00
c995216bab
target/sparc: Move FSQRTq to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
8aa418b3ef
target/sparc: Move gen_fop_DD insns to decodetree
...
Move FSQRTd, FxTOd, FdTOx.
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 >
2023-10-25 01:01:13 -07:00
119cb94f69
target/sparc: Move gen_fop_FF insns to decodetree
...
Move FSQRTs, FiTOs, FsTOi.
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 >
2023-10-25 01:01:13 -07:00
4b6edc0a27
target/sparc: Move gen_gsr_fop_DDD insns to decodetree
...
Move FPACK32, FALIGNDATA, BSHUFFLE.
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 >
2023-10-25 01:01:13 -07:00
afb043448b
target/sparc: Move PDIST to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
e06c9f83c6
target/sparc: Move gen_ne_fop_DDD insns to decodetree
...
Move FMUL8x16, FMUL8x16AU, FMUL8x16AL, FMUL8SUx16, FMUL8ULx16,
FMULD8SUx16, FMULD8ULx16, FPMERGE, FEXPAND, FANDNOT1d, FANDNOT2d,
FANDd, FNANDd, FNORd, FORNOT1d, FORNOT2d, FORd, FPADD16d, FPADD32d,
FPSUB16d, FPSUB32d, FXNORd, FXORd.
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 >
2023-10-25 01:01:13 -07:00
7f10b52f7b
target/sparc: Move gen_ne_fop_FFF insns to decodetree
...
Move FANDNOT1s, FANDNOT2s, FANDs, FNANDs, FNORs, FORNOT1s, FORNOT2s,
FORs, FPADD16s, FPADD32s, FPSUB16s, FPSUB32s, FXNORs, FXORs.
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 >
2023-10-25 01:01:13 -07:00
fafba1bb0b
target/sparc: Use tcg_gen_vec_{add,sub}*
...
Replace the local helpers for the same integer operations.
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 >
2023-10-25 01:01:13 -07:00
c6d83e4ff5
target/sparc: Move FMOVD, FNEGD, FABSD, FSRC*D, FNOT*D to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
baf3dbf258
target/sparc: Move FMOVS, FNEGS, FABSS, FSRC*S, FNOT*S to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
39ca3490f8
target/sparc: Move BMASK to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
9e20ca9409
target/sparc: Move ADDRALIGN* to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
45bfed3b2c
target/sparc: Move ARRAY* to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
b88ce6f246
target/sparc: Move EDGE* to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
da68140604
target/sparc: Merge LDFSR, LDXFSR implementations
...
Combine the helper to a single set_fsr().
Perform the mask and merge inline.
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 >
2023-10-25 01:01:13 -07:00
3d3c06737b
target/sparc: Move LDFSR, STFSR to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
287b11520b
target/sparc: Move asi fp load/store to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
06c060d9e5
target/sparc: Move simple fp load/store to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
3259b9e2fd
target/sparc: Split out fp ldst functions with asi precomputed
...
Take the operation size from the MemOp instead of a
separate parameter.
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 >
2023-10-25 01:01:13 -07:00
5458fd3153
target/sparc: Move PREFETCH, PREFETCHA to decodetree
...
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 >
2023-10-25 01:01:13 -07:00
d0a11d25f0
target/sparc: Move CASA, CASXA to decodetree
...
Remove gen_cas_asi, gen_casx_asi.
Rename gen_cas_asi0 to gen_cas_asi.
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 >
2023-10-25 01:01:13 -07:00
dca544b991
target/sparc: Move SWAP, SWAPA to decodetree
...
Remove gen_swap_asi.
Rename gen_swap_asi0 to gen_swap_asi.
Merge gen_swap into gen_swap_asi.
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 >
2023-10-25 01:01:13 -07:00