Skip to content

Generate strided vector loads/stores with tcg nodes

Chao Liu qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v10 Latest2 patches 2 repliesIn review

Patches in v10 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2target/riscv: Use tcg nodes for strided vector ld/st generationtarget/riscv/insn_trans/trans_rvv.c.inc+337 -172 replies
2/2tests/tcg/riscv64: Add test for vlsseg8e32 instructiontests/tcg/riscv64/Makefile.softmmu-target tests/tcg/riscv64/test-vlsseg8e32.S+113 -10 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchEric BiggersDaniel Henrique Barboza
1/2T-b R-b
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v10 thread

Cover letter [PATCH v10 0/2] Generate strided vector loads/stores with tcg nodes

Hi Alistair,

In patch v10:

- Update the email address of the patch submitter.
- Rebase on the latest riscv-to-apply.next branch.

History of changes:

patch v9:
- Simplify the implementation of gen_check_vext_elem_mask():
remove the mask argument, compute the mask directly inside the function, and eliminate redundant code.
- Limit the bit width to 8 bits when loading the mask from memory.
- Remove the vreg argument in gen_ldst_vreg().
https://lore.kernel.org/qemu-devel/[email protected]/

patch v8:
- Use the right TCGv type for each variable — for example, make mask_elem type TCGv_i64.
- Use tcg_gen_trunc_i64_ptr() to change TCGv types — don't use C-style casting.
- Use TCG_COND_TSTNE, not TCG_COND_NE in tcg_gen_brcond_i64() to represent:
if (vext_elem_mask(v0, i) != 0)
https://lore.kernel.org/qemu-devel/[email protected]/

patch v7:
- Standardize the subject line of patch 1 and remove the trailing period.
- Split into sub-functions to improve the patch's code readability and facilitate review.
- Use more faster TCG ops, use tcg_gen_andi_tl() instead of tcg_gen_rem_tl().
- Add a tested-by signature for patch 2, as Eric has already tested it.
https://lore.kernel.org/qemu-devel/[email protected]/

patch v6:
- If a strided vector memory access instruction has non-zero vstart, check it through vlse/vsse helpers function.
- Adjust the tcg test Makefile.
https://lore.kernel.org/qemu-devel/[email protected]/

Patch v5:
- Removed the redundant call to mark_vs_dirty(s) within the gen_ldst_stride_main_loop() function.
https://lore.kernel.org/qemu-riscv/[email protected]/

Patch v4:
- Use ctz32() replace to for-loop
https://lore.kernel.org/qemu-devel/[email protected]/

Patch v3:
- Fix the get_log2() function:
https://lore.kernel.org/qemu-riscv/[email protected]/T/#t
- Add test for vlsseg8e32 instruction.
- Rebase on top of the latest master.

Patch v2:
- Split the TCG node emulation of the complex strided load/store operation into two separate functions to simplify the implementation:
https://lore.kernel.org/qemu-riscv/[email protected]/

Patch v1:
- Paolo submitted the initial version of the patch.
https://lore.kernel.org/qemu-devel/[email protected]/

Thanks,
Chao

Chao Liu (2):
target/riscv: Use tcg nodes for strided vector ld/st generation tests/tcg/riscv64: Add test for vlsseg8e32 instruction

 target/riscv/insn_trans/trans_rvv.c.inc   | 354 ++++++++++++++++++++--
 tests/tcg/riscv64/Makefile.softmmu-target |   7 +-
 tests/tcg/riscv64/test-vlsseg8e32.S       | 107 +++++++
 3 files changed, 450 insertions(+), 18 deletions(-)
 create mode 100644 tests/tcg/riscv64/test-vlsseg8e32.S

--
2.53.0