]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/riscv: rvv: Fix vslide1[up|down].vx unexpected result when XLEN=32 and SEW=64
authorMax Chou <max.chou@sifive.com>
Fri, 24 Jan 2025 07:33:22 +0000 (15:33 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 3 Oct 2025 03:15:14 +0000 (13:15 +1000)
commit81d1885dcc4424fec6761120f6e251eb3408fb8e
tree79f70c29167229e1674c4f1194a8aa1f68e0346b
parentbe50ff3a73859ebbbdc0e6f704793062b1743d93
target/riscv: rvv: Fix vslide1[up|down].vx unexpected result when XLEN=32 and SEW=64

When XLEN is 32 and SEW is 64, the original implementation of
vslide1up.vx and vslide1down.vx helper functions fills the 32-bit value
of rs1 into the first element of the destination vector register (rd),
which is a 64-bit element.

This commit attempted to resolve the issue by extending the rs1 value
to 64 bits during the TCG translation phase to ensure that the helper
functions won't lost the higer 32 bits.

Signed-off-by: Max Chou <max.chou@sifive.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20250124073325.2467664-1-max.chou@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/helper.h
target/riscv/insn_trans/trans_rvv.c.inc
target/riscv/vector_helper.c