target/riscv: Support XTheadVector extension
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest65 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/65 | riscv: thead: Add th.sxstatus CSR emulationtarget/ target/ target/ +1 more | +83 | 0 replies | |
| 2/65 | target/riscv: Reuse th_csr.c to add user-mode csrstarget/ target/ target/ | +15 | 0 replies | |
| 3/65 | target/riscv: Add properties for XTheadVector extensiontarget/ target/ target/ +1 more | +39 | 0 replies | |
| 4/65 | target/riscv: Override some csr ops for XTheadVectortarget/ target/ target/ +1 more | +243 | 0 replies | |
| 5/65 | target/riscv: Add mlen in DisasContexttarget/ | +4 | 0 replies | |
| 6/65 | target/riscv: Implement insns decode rules for XTheadVectortarget/ target/ target/ +1 more | +778 | 0 replies | |
| 7/65 | target/riscv: implement th.vsetvl{i} for XTheadVectortarget/ | +91 | 0 replies | |
| 8/65 | target/riscv: Add strided load instructions for XTheadVectortarget/ target/ target/ +4 more | +467 | 0 replies | |
| 9/65 | target/riscv: Add strided store instructions for XTheadVectortarget/ target/ target/ | +115 | 0 replies | |
| 10/65 | target/riscv: Add unit-stride load instructions for XTheadVectortarget/ target/ target/ | +207 | 0 replies | |
| 11/65 | target/riscv: Add unit-stride store instructions for XTheadVectortarget/ target/ target/ | +112 | 0 replies | |
| 12/65 | target/riscv: Add indexed load instructions for XTheadVectortarget/ target/ target/ +2 more | +194 | 0 replies | |
| 13/65 | target/riscv: Add indexed store instructions for XTheadVectortarget/ target/ target/ | +82 | 0 replies | |
| 14/65 | target/riscv: Add unit-stride fault-only-first instructions for XTheadVectortarget/ target/ target/ +2 more | +197 | 0 replies | |
| 15/65 | target/riscv: Add vector amo operations for XTheadVectortarget/ target/ target/ | +301 | 0 replies | |
| 16/65 | target/riscv: Add single-width integer add and subtract instructions for XTheadVectortarget/ target/ target/ +2 more | +413 | 0 replies | |
| 17/65 | target/riscv: Add widening integer add/subtract instructions for XTheadVectortarget/ target/ target/ +2 more | +339 | 0 replies | |
| 18/65 | target/riscv: Add integer add-with-carry/sub-with-borrow instructions for XTheadVectortarget/ target/ target/ | +335 | 0 replies | |
| 19/65 | target/riscv: Add bitwise logical instructions for XTheadVectortarget/ target/ target/ | +87 | 0 replies | |
| 20/65 | target/riscv: Add single-width bit shift instructions for XTheadVectortarget/ target/ target/ | +192 | 0 replies | |
| 21/65 | target/riscv: Add narrowing integer right shift instructions for XTheadVectortarget/ target/ target/ | +132 | 0 replies | |
| 22/65 | target/riscv: Add integer compare instructions for XTheadVectortarget/ target/ target/ | +233 | 0 replies | |
| 23/65 | target/riscv: Add integer min/max instructions for XTheadVectortarget/ target/ target/ | +110 | 0 replies | |
| 24/65 | target/riscv: Add single-width integer multiply instructions for XTheadVectortarget/ target/ target/ +2 more | +141 | 0 replies | |
| 25/65 | target/riscv: Add integer divide instructions for XTheadVectortarget/ target/ target/ | +117 | 0 replies | |
| 26/65 | target/riscv: Add widening integer multiply instructions for XTheadVectortarget/ target/ target/ +2 more | +69 | 0 replies | |
| 27/65 | target/riscv: Add single-width integer multiply-add instructions for XTheadVectortarget/ target/ target/ | +130 | 0 replies | |
| 28/65 | target/riscv: Add widening integer multiply-add instructions for XTheadVectortarget/ target/ target/ +2 more | +79 | 0 replies | |
| 29/65 | target/riscv: Add integer merge and move instructions for XTheadVectortarget/ target/ target/ | +239 | 0 replies | |
| 30/65 | target/riscv: Add single-width saturating add and sub instructions for XTheadVectortarget/ target/ target/ +2 more | +315 | 0 replies | |
| 31/65 | target/riscv: Add single-width average add and sub instructions for XTheadVectortarget/ target/ target/ +2 more | +69 | 0 replies | |
| 32/65 | target/riscv: Add single-width fractional mul with rounding and saturation for XTheadVectortarget/ target/ target/ +2 more | +42 | 0 replies | |
| 33/65 | target/riscv: Add widening saturating scaled multiply-add instructions for XTheadVectortarget/ target/ target/ +2 more | +244 | 0 replies | |
| 34/65 | target/riscv: Add single-width scaling shift instructions for XTheadVectortarget/ target/ target/ +2 more | +81 | 0 replies | |
| 35/65 | target/riscv: Add narrowing fixed-point clip instructions for XTheadVectortarget/ target/ target/ +2 more | +70 | 0 replies | |
| 36/65 | target/riscv: Add single-width floating-point add/sub instructions for XTheadVectortarget/ target/ target/ +2 more | +237 | 0 replies | |
| 37/65 | target/riscv: Add widening floating-point add/sub instructions for XTheadVectortarget/ target/ target/ +2 more | +226 | 0 replies | |
| 38/65 | target/riscv: Add single-width floating-point multiply/divide instructions for XTheadVectortarget/ target/ target/ +2 more | +64 | 0 replies | |
| 39/65 | target/riscv: Add widening floating-point multiply instructions for XTheadVectortarget/ target/ target/ +2 more | +25 | 0 replies | |
| 40/65 | target/riscv: Add single-width floating-point fused multiply-add instructions for XTheadVectortarget/ target/ target/ +2 more | +241 | 0 replies | |
| 41/65 | target/riscv: Add widening floating-point fused mul-add instructions for XTheadVectortarget/ target/ target/ +2 more | +82 | 0 replies | |
| 42/65 | target/riscv: Add floating-pointing square-root instructions for XTheadVectortarget/ target/ target/ | +90 | 0 replies | |
| 43/65 | target/riscv: Add floating-point MIN/MAX instructions for XTheadVectortarget/ target/ target/ | +46 | 0 replies | |
| 44/65 | target/riscv: Add floating-point sign-injection instructions for XTheadVectortarget/ target/ target/ +2 more | +87 | 0 replies | |
| 45/65 | target/riscv: Add floating-point compare instructions for XTheadVectortarget/ target/ target/ +2 more | +189 | 0 replies | |
| 46/65 | target/riscv: Add floating-point classify and merge instructions for XTheadVectortarget/ target/ target/ | +114 | 0 replies | |
| 47/65 | target/riscv: Add single-width floating-point/integer type-convert instructions for XTheadVectortarget/ target/ target/ | +52 | 0 replies | |
| 48/65 | target/riscv: Add widening floating-point/integer type-convert instructions for XTheadVectortarget/ target/ target/ +2 more | +149 | 0 replies | |
| 49/65 | target/riscv: Add narrowing floating-point/integer type-convert instructions for XTheadVectortarget/ target/ target/ +2 more | +147 | 0 replies | |
| 50/65 | target/riscv: Add single-width integer reduction instructions for XTheadVectortarget/ target/ target/ | +128 | 0 replies | |
| 51/65 | target/riscv: Add widening integer reduction instructions for XTheadVectortarget/ target/ target/ | +22 | 0 replies | |
| 52/65 | target/riscv: Add single-width floating-point reduction instructions for XTheadVectortarget/ target/ target/ | +64 | 0 replies | |
| 53/65 | target/riscv: Add widening floating-point reduction instructions for XTheadVectortarget/ target/ target/ | +22 | 0 replies | |
| 54/65 | target/riscv: Add mask-register logical instructions for XTheadVectortarget/ target/ target/ | +87 | 0 replies | |
| 55/65 | target/riscv: Add vector mask population count vmpopc for XTheadVectortarget/ target/ target/ | +53 | 0 replies | |
| 56/65 | target/riscv: Add th.vmfirst.m for XTheadVectortarget/ target/ target/ | +52 | 0 replies | |
| 57/65 | target/riscv: Add set-X-first mask bit instructrions for XTheadVectortarget/ target/ target/ | +101 | 0 replies | |
| 58/65 | target/riscv: Add vector iota instruction for XTheadVectortarget/ target/ target/ | +63 | 0 replies | |
| 59/65 | target/riscv: Add vector element index instruction for XTheadVectortarget/ target/ target/ | +57 | 0 replies | |
| 60/65 | target/riscv: Add integer extract and scalar move instructions for XTheadVectortarget/ | +152 | 0 replies | |
| 61/65 | target/riscv: Add floating-point scalar move instructions for XTheadVectortarget/ | +57 | 0 replies | |
| 62/65 | target/riscv: Add vector slide instructions for XTheadVectortarget/ target/ target/ | +159 | 0 replies | |
| 63/65 | target/riscv: Add vector register gather instructions for XTheadVectortarget/ target/ target/ | +155 | 0 replies | |
| 64/65 | target/riscv: Add vector compress instruction for XTheadVectortarget/ target/ target/ | +63 | 0 replies | |
| 65/65 | target/riscv: Enable XTheadVector extension for c906target/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/65]target/riscv: Support XTheadVector extension
This patchset implements the XTheadVector extension for RISC-V on QEMU.
You can find the full description of the XTheadVector extension at:
https://github.com/RISCV-SPEC/thead-extension-spec/blob/master/xtheadvector.adoc
The XTheadvector extension is a non-standard extension for RISC-V. The encoding space of the XTheadVector instructions overlaps with those of the V extension.
The XTheadVector is similar to the V extension v0.7.1, so it has several differences with the current V extension v1.0 which is supported by QEMU.
Here is a simple list of the differences:
* Different instructions
* Different CSR behaviors
* Different mask register layout
* Different overlap policy
* Different masked/tail element processing policy
* Same instructions have different behaviors in detail
This patchset is based on https://github.com/alistair23/qemu/tree/riscv-to-apply.next,
relay on some former patches which are not merged into upstream yet:
* target/riscv: Implement dynamic establishment of custom decoder
(https://patchew.org/QEMU/[email protected]/)
* riscv: set vstart_eq_zero on vector insns
(https://patchew.org/QEMU/[email protected]/)
* riscv: thead: Add th.sxstatus CSR emulation
(https://patchew.org/QEMU/[email protected]/)
The patch 'riscv: thead: Add th.sxstatus CSR emulation' is included in the patchset for we need to change it to support XTheadVector csrs.
Christoph Müllner (1):
riscv: thead: Add th.sxstatus CSR emulation
Huang Tao (64):
target/riscv: Reuse th_csr.c to add user-mode csrs target/riscv: Add properties for XTheadVector extension target/riscv: Override some csr ops for XTheadVector target/riscv: Add mlen in DisasContext
target/riscv: Implement insns decode rules for XTheadVector target/riscv: implement th.vsetvl{i} for XTheadVector target/riscv: Add strided load instructions for XTheadVector target/riscv: Add strided store instructions for XTheadVector target/riscv: Add unit-stride load instructions for XTheadVector target/riscv: Add unit-stride store instructions for XTheadVector target/riscv: Add indexed load instructions for XTheadVector target/riscv: Add indexed store instructions for XTheadVector target/riscv: Add unit-stride fault-only-first instructions for
XTheadVector
target/riscv: Add vector amo operations for XTheadVector target/riscv: Add single-width integer add and subtract instructions
for XTheadVector
target/riscv: Add widening integer add/subtract instructions for
XTheadVector
target/riscv: Add integer add-with-carry/sub-with-borrow instructions
for XTheadVector
target/riscv: Add bitwise logical instructions for XTheadVector target/riscv: Add single-width bit shift instructions for XTheadVector target/riscv: Add narrowing integer right shift instructions for
XTheadVector
target/riscv: Add integer compare instructions for XTheadVector target/riscv: Add integer min/max instructions for XTheadVector target/riscv: Add single-width integer multiply instructions for
XTheadVector
target/riscv: Add integer divide instructions for XTheadVector target/riscv: Add widening integer multiply instructions for
XTheadVector
target/riscv: Add single-width integer multiply-add instructions for
XTheadVector
target/riscv: Add widening integer multiply-add instructions for
XTheadVector
target/riscv: Add integer merge and move instructions for XTheadVector target/riscv: Add single-width saturating add and sub instructions for
XTheadVector
target/riscv: Add single-width average add and sub instructions for
XTheadVector
target/riscv: Add single-width fractional mul with rounding and
saturation for XTheadVector
target/riscv: Add widening saturating scaled multiply-add instructions
for XTheadVector
target/riscv: Add single-width scaling shift instructions for
XTheadVector
target/riscv: Add narrowing fixed-point clip instructions for
XTheadVector
target/riscv: Add single-width floating-point add/sub instructions for
XTheadVector
target/riscv: Add widening floating-point add/sub instructions for
XTheadVector
target/riscv: Add single-width floating-point multiply/divide
instructions for XTheadVector
target/riscv: Add widening floating-point multiply instructions for
XTheadVector
target/riscv: Add single-width floating-point fused multiply-add
instructions for XTheadVector
target/riscv: Add widening floating-point fused mul-add instructions
for XTheadVector
target/riscv: Add floating-pointing square-root instructions for
XTheadVector
target/riscv: Add floating-point MIN/MAX instructions for XTheadVector target/riscv: Add floating-point sign-injection instructions for
XTheadVector
target/riscv: Add floating-point compare instructions for XTheadVector target/riscv: Add floating-point classify and merge instructions for
XTheadVector
target/riscv: Add single-width floating-point/integer type-convert
instructions for XTheadVector
target/riscv: Add widening floating-point/integer type-convert
instructions for XTheadVector
target/riscv: Add narrowing floating-point/integer type-convert
instructions for XTheadVector
target/riscv: Add single-width integer reduction instructions for
XTheadVector
target/riscv: Add widening integer reduction instructions for
XTheadVector
target/riscv: Add single-width floating-point reduction instructions
for XTheadVector
target/riscv: Add widening floating-point reduction instructions for
XTheadVector
target/riscv: Add mask-register logical instructions for XTheadVector target/riscv: Add vector mask population count vmpopc for XTheadVector target/riscv: Add th.vmfirst.m for XTheadVector target/riscv: Add set-X-first mask bit instructrions for XTheadVector target/riscv: Add vector iota instruction for XTheadVector target/riscv: Add vector element index instruction for XTheadVector target/riscv: Add integer extract and scalar move instructions for
XTheadVector
target/riscv: Add floating-point scalar move instructions for
XTheadVector
target/riscv: Add vector slide instructions for XTheadVector target/riscv: Add vector register gather instructions for XTheadVector target/riscv: Add vector compress instruction for XTheadVector target/riscv: Enable XTheadVector extension for c906
target/riscv/cpu.c | 4 + target/riscv/cpu.h | 39 + target/riscv/cpu_bits.h | 18 + target/riscv/cpu_cfg.h | 2 + target/riscv/cpu_helper.c | 2 +- target/riscv/csr.c | 42 +- target/riscv/helper.h | 1067 +++++ .../riscv/insn_trans/trans_xtheadvector.c.inc | 2933 +++++++++++++ target/riscv/internals.h | 12 + target/riscv/meson.build | 3 + target/riscv/tcg/tcg-cpu.c | 33 + target/riscv/th_csr.c | 250 ++ target/riscv/translate.c | 7 + target/riscv/vector_helper.c | 306 +- target/riscv/vector_internals.h | 187 + target/riscv/xtheadvector.decode | 390 ++ target/riscv/xtheadvector_helper.c | 3894 +++++++++++++++++ 17 files changed, 8983 insertions(+), 206 deletions(-) create mode 100644 target/riscv/insn_trans/trans_xtheadvector.c.inc create mode 100644 target/riscv/th_csr.c create mode 100644 target/riscv/xtheadvector.decode create mode 100644 target/riscv/xtheadvector_helper.c
Signature · 1 line
2.44.0