]> 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)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 15 Oct 2025 20:27:03 +0000 (23:27 +0300)
commit381a32c3e20d89120c6167e3adb3b3c33d08c6b3
tree35275f7fce7d341f8b9ab1e0d093d29f8a2f9f79
parent0c21b32947b2ffa2f1027a6edea5e9f47284248e
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>
(cherry picked from commit 81d1885dcc4424fec6761120f6e251eb3408fb8e)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/riscv/helper.h
target/riscv/insn_trans/trans_rvv.c.inc
target/riscv/vector_helper.c