target/riscv: Convert to decodetree
Get series with b4
b4 am [email protected]Versions newest first
- v7 Latest35 patches 9 repliesIn review
Changes in v7 from the cover letter
- Rebased on top of riscv-for-master-4.0-sf1, which contains a refactoring of the original translation code.
- Added handling of mstatus.fs to the floating-point routines.
Patches in v7 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/35 | target/riscv: Move CPURISCVState pointer to DisasContexttarget/ | +4 | 1 reply | |
| 2/35 | target/riscv: Activate decodetree and implemnt LUI & AUIPCtarget/ target/ target/ +1 more | +92 | 0 replies | |
| 3/35 | target/riscv: Convert RVXI branch insns to decodetreetarget/ target/ target/ | +69 | 0 replies | |
| 4/35 | target/riscv: Convert RV32I load/store insns to decodetreetarget/ target/ | +58 | 0 replies | |
| 5/35 | target/riscv: Convert RV64I load/store insns to decodetreetarget/ target/ target/ +1 more | +50 | 0 replies | |
| 6/35 | target/riscv: Convert RVXI arithmetic insns to decodetreetarget/ target/ target/ +1 more | +206 | 0 replies | |
| 7/35 | target/riscv: Convert RVXI fence insns to decodetreetarget/ target/ target/ | +21 | 0 replies | |
| 8/35 | target/riscv: Convert RVXI csr insns to decodetreetarget/ target/ target/ | +88 | 0 replies | |
| 9/35 | target/riscv: Convert RVXM insns to decodetreetarget/ target/ target/ +1 more | +118 | 0 replies | |
| 10/35 | target/riscv: Convert RV32A insns to decodetreetarget/ target/ target/ | +167 | 1 reply | |
| 11/35 | target/riscv: Convert RV64A insns to decodetreetarget/ target/ target/ | +71 | 0 replies | |
| 12/35 | target/riscv: Convert RV32F insns to decodetreetarget/ target/ target/ | +389 | 1 reply | |
| 13/35 | target/riscv: Convert RV64F insns to decodetreetarget/ target/ | +63 | 0 replies | |
| 14/35 | target/riscv: Convert RV32D insns to decodetreetarget/ target/ target/ | +364 | 0 replies | |
| 15/35 | target/riscv: Convert RV64D insns to decodetreetarget/ target/ target/ | +85 | 0 replies | |
| 16/35 | target/riscv: Convert RV priv insns to decodetreetarget/ target/ target/ | +126 | 1 reply | |
| 17/35 | target/riscv: Convert quadrant 0 of RVXC insns to decodetreetarget/ target/ target/ +1 more | +154 | 0 replies | |
| 18/35 | target/riscv: Convert quadrant 1 of RVXC insns to decodetreetarget/ target/ target/ | +195 | 0 replies | |
| 19/35 | target/riscv: Convert quadrant 2 of RVXC insns to decodetreetarget/ target/ target/ | +134 | 0 replies | |
| 20/35 | target/riscv: Remove gen_jalr()target/ target/ | +27 | 1 reply | |
| 21/35 | target/riscv: Remove manual decoding from gen_branch()target/ target/ | +33 | 1 reply | |
| 22/35 | target/riscv: Remove manual decoding from gen_load()target/ target/ | +25 | 0 replies | |
| 23/35 | target/riscv: Remove manual decoding from gen_store()target/ target/ | +24 | 0 replies | |
| 24/35 | target/riscv: Move gen_arith_imm() decoding into trans_* functionstarget/ target/ target/ | +108 | 0 replies | |
| 25/35 | target/riscv: make ADD/SUB/OR/XOR/AND insn use arg liststarget/ target/ target/ | +34 | 0 replies | |
| 26/35 | target/riscv: Remove shift and slt insn manual decodingtarget/ target/ | +81 | 0 replies | |
| 27/35 | target/riscv: Remove manual decoding of RV32/64M insntarget/ target/ | +164 | 0 replies | |
| 28/35 | target/riscv: Rename trans_arith to gen_arithtarget/ target/ target/ | +18 | 0 replies | |
| 29/35 | target/riscv: Remove gen_system()target/ | +0 | 0 replies | |
| 30/35 | target/riscv: Remove decode_RV32_64G()target/ | +1 | 0 replies | |
| 31/35 | target/riscv: Convert @cs_2 insns to share translation functionstarget/ target/ target/ +2 more | +54 | 0 replies | |
| 32/35 | target/riscv: Convert @cl_d, @cl_w, @cs_d, @cs_w insnstarget/ target/ target/ | +12 | 0 replies | |
| 33/35 | target/riscv: Splice fsw_sd and flw_ld for riscv32 vs riscv64target/ target/ target/ +3 more | +31 | 0 replies | |
| 34/35 | target/riscv: Splice remaining compressed insn pairs for riscv32 vs riscv64target/ target/ target/ +2 more | +16 | 0 replies | |
| 35/35 | target/riscv: Remaining rvc insn reuse 32 bit translatorstarget/ target/ | +17 | 0 replies |
Reviews trailers per patch
All 35 patches have a Reviewed-by or Acked-by.
| Patch | Alistair Francis | Richard Henderson | Palmer Dabbelt | Bastian Koppelmann |
|---|---|---|---|---|
| Series | T-b | |||
| 1/35 | R-b | R-b | R-b | |
| 2/35 | A-b | R-b | ||
| 3/35 | A-b | R-b | R-b | |
| 4/35 | A-b | R-b | ||
| 5/35 | A-b | R-b | ||
| 6/35 | A-b | R-b | ||
| 7/35 | A-b | R-b | ||
| 8/35 | A-b | R-b | ||
| 9/35 | A-b | R-b | ||
| 10/35 | A-b | R-b | ||
| 11/35 | A-b | R-b | ||
| 12/35 | A-b | R-b | ||
| 13/35 | A-b | R-b | ||
| 14/35 | A-b | R-b | ||
| 15/35 | A-b | R-b | ||
| 16/35 | A-b | R-b | ||
| 17/35 | R-b | |||
| 18/35 | R-b | |||
| 19/35 | R-b | |||
| 20/35 | A-b | R-b | ||
| 21/35 | R-b | |||
| 22/35 | R-b | |||
| 23/35 | R-b | |||
| 24/35 | R-b | |||
| 25/35 | R-b | |||
| 26/35 | R-b | |||
| 27/35 | R-b | |||
| 28/35 | R-b | |||
| 29/35 | R-b | |||
| 30/35 | R-b | |||
| 31/35 | R-b | |||
| 32/35 | R-b | |||
| 33/35 | R-b | |||
| 34/35 | R-b | |||
| 35/35 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [Qemu-devel] [PATCH v7 00/35] target/riscv: Convert to decodetree
Palmer: I caused some merge conflicts in Bastian's patch set so I figured I'd attempt to clean these up. As far as I'm concerned v6 was good to go, but since the merge conflicts were fairly extensive (if somewhat mechanical) I'd like to pass the baton back to Bastian here for at least a sanity check.
Hi,
this patchset converts the RISC-V decoder to decodetree in four major steps:
1) Convert 32-bit instructions to decodetree [Patch 1-16]:
Many of the gen_* functions are called by the decode functions for 16-bit and 32-bit functions. If we move translation code from the gen_* functions to the generated trans_* functions of decode-tree, we get a lot of duplication. Therefore, we mostly generate calls to the old gen_* function which are properly replaced after step 2).
Each of the trans_ functions are grouped into files corresponding to their ISA extension, e.g. addi which is in RV32I is translated in the file 'trans_rvi.inc.c'.
2) Convert 16-bit instructions to decodetree [Patch 17-19]:
All 16 bit instructions have a direct mapping to a 32 bit instruction. Thus, we convert the arguments in the 16 bit trans_ function to the arguments of the corresponding 32 bit instruction and call the 32 bit trans_ function.
3) Remove old manual decoding in gen_* function [Patch 20-30]:
this move all manual translation code into the trans_* instructions of decode tree, such that we can remove the old decode_* functions.
4) Simplify RVC by reusing as much as possible from the RVG decoder as suggested by Richard. [Patch 31-35]
full tree available at
https://github.com/palmer-dabbelt/qemu/tree/riscv-dt-v7
Cheers,
Bastian
v6 -> v7:
- Rebased on top of riscv-for-master-4.0-sf1, which contains a refactoring of the original translation code.
- Added handling of mstatus.fs to the floating-point routines.
v5 -> v6:
- fixed funky indentation