qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/14] tcg/riscv: Add support for vector
@ 2024-08-30  6:15 LIU Zhiwei
  2024-08-30  6:15 ` [PATCH v2 01/14] tcg/op-gvec: Fix iteration step in 32-bit operation LIU Zhiwei
                   ` (13 more replies)
  0 siblings, 14 replies; 33+ messages in thread
From: LIU Zhiwei @ 2024-08-30  6:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-riscv, palmer, alistair.francis, dbarboza, liwei1518,
	bmeng.cn, zhiwei_liu, richard.henderson, TANG Tiancheng

From: TANG Tiancheng <tangtiancheng.ttc@alibaba-inc.com>

This patch set introduces support for the RISC-V vector extension
in TCG backend for RISC-V targets.

v2:
  1. Remove [PATCH v1 03/15] and use a simpler approach with fixed
  constraints at initialization in the backend instead of modifying
  register allocation constraints in tcg.c. See details in 2.

  2. Change the available vector registers, and the constraint registers
  which are defined in "tcg-target-con-str.h", to the minimum for all
  vector instructions; for TCG_TYPE_V256 (vlen=64, lmul=4, omitting v0),
  max 7 registers, and TCG_TYPE_V128/64 also use only 7.

  3. Remove all inline markers; let the compiler decide.

  4. Merge thread variables to use only prev_vtype.

  5. Increase use of whole load/store instructions when bit width ≥ vlen.

  6. Add vmv<nr>r.v to move registers when bit width ≥ vlen.

  7. Configure vtype with separate operation length (vl) and element
  width (SEW); IRs not changing SEW should inherit SEW from the previous IR
  (e.g., load/store/move/dup/dupm, and/or/xor/not). Place set_vec_config
  in the switch.

  8. Change vlen detection to include element width.

  9. Use neg instead of sub in cmp_vec expand.

  10. Complete all expansions in cmp_vec's expand function, not in
  tcg_out_vec_op.

  11. Move some asserts into tcg_out_opc_*.

  12. Remove the check for riscv_vlen >= 64 when enabling vector support. 

  13. Move not_vec to patch 7.

  14. Change OPC_VRSUB_VX to OPC_VRSUB_VI

  15. Move the vsetvli out of the SIGILL probe.

  16. Move the initialization of the riscv_vlen to the cpuinfo_init.

v1:
  https://lists.gnu.org/archive/html/qemu-riscv/2024-08/msg00205.html

Swung0x48 (1):
  tcg/riscv: Add basic support for vector

TANG Tiancheng (13):
  tcg/op-gvec: Fix iteration step in 32-bit operation
  util: Add RISC-V vector extension probe in cpuinfo
  tcg/riscv: Add riscv vset{i}vli support
  tcg/riscv: Implement vector load/store
  tcg/riscv: Implement vector mov/dup{m/i}
  tcg/riscv: Add support for basic vector opcodes
  tcg/riscv: Implement vector cmp ops
  tcg/riscv: Implement vector neg ops
  tcg/riscv: Implement vector sat/mul ops
  tcg/riscv: Implement vector min/max ops
  tcg/riscv: Implement vector shs/v ops
  tcg/riscv: Implement vector roti/v/x shi ops
  tcg/riscv: Enable native vector support for TCG host

 host/include/riscv/host/cpuinfo.h |   2 +
 tcg/riscv/tcg-target-con-set.h    |   9 +
 tcg/riscv/tcg-target-con-str.h    |   2 +
 tcg/riscv/tcg-target.c.inc        | 961 ++++++++++++++++++++++++++++--
 tcg/riscv/tcg-target.h            |  80 ++-
 tcg/riscv/tcg-target.opc.h        |  20 +
 tcg/tcg-op-gvec.c                 |   2 +-
 util/cpuinfo-riscv.c              |  26 +-
 8 files changed, 1032 insertions(+), 70 deletions(-)
 create mode 100644 tcg/riscv/tcg-target.opc.h

-- 
2.43.0



^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2024-09-05  1:42 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30  6:15 [PATCH v2 00/14] tcg/riscv: Add support for vector LIU Zhiwei
2024-08-30  6:15 ` [PATCH v2 01/14] tcg/op-gvec: Fix iteration step in 32-bit operation LIU Zhiwei
2024-08-31 23:59   ` Richard Henderson
2024-08-30  6:15 ` [PATCH v2 02/14] util: Add RISC-V vector extension probe in cpuinfo LIU Zhiwei
2024-09-02  0:12   ` Richard Henderson
2024-08-30  6:15 ` [PATCH v2 03/14] tcg/riscv: Add basic support for vector LIU Zhiwei
2024-09-02  0:28   ` Richard Henderson
2024-08-30  6:15 ` [PATCH v2 04/14] tcg/riscv: Add riscv vset{i}vli support LIU Zhiwei
2024-09-02  1:06   ` Richard Henderson
2024-08-30  6:15 ` [PATCH v2 05/14] tcg/riscv: Implement vector load/store LIU Zhiwei
2024-09-02  1:31   ` Richard Henderson
2024-08-30  6:15 ` [PATCH v2 06/14] tcg/riscv: Implement vector mov/dup{m/i} LIU Zhiwei
2024-09-02  1:36   ` Richard Henderson
2024-08-30  6:16 ` [PATCH v2 07/14] tcg/riscv: Add support for basic vector opcodes LIU Zhiwei
2024-09-02  1:39   ` Richard Henderson
2024-08-30  6:16 ` [PATCH v2 08/14] tcg/riscv: Implement vector cmp ops LIU Zhiwei
2024-09-03  6:45   ` Richard Henderson
2024-09-03 14:51     ` Richard Henderson
2024-08-30  6:16 ` [PATCH v2 09/14] tcg/riscv: Implement vector neg ops LIU Zhiwei
2024-09-03 14:52   ` Richard Henderson
2024-08-30  6:16 ` [PATCH v2 10/14] tcg/riscv: Implement vector sat/mul ops LIU Zhiwei
2024-09-03 14:52   ` Richard Henderson
2024-08-30  6:16 ` [PATCH v2 11/14] tcg/riscv: Implement vector min/max ops LIU Zhiwei
2024-09-03 14:53   ` Richard Henderson
2024-08-30  6:16 ` [PATCH v2 12/14] tcg/riscv: Implement vector shs/v ops LIU Zhiwei
2024-09-03 14:54   ` Richard Henderson
2024-08-30  6:16 ` [PATCH v2 13/14] tcg/riscv: Implement vector roti/v/x shi ops LIU Zhiwei
2024-09-03 15:15   ` Richard Henderson
2024-09-04 15:25     ` LIU Zhiwei
2024-09-04 19:05       ` Richard Henderson
2024-09-05  1:40         ` LIU Zhiwei
2024-08-30  6:16 ` [PATCH v2 14/14] tcg/riscv: Enable native vector support for TCG host LIU Zhiwei
2024-09-03 15:02   ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).