]> 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>
Thu, 9 Oct 2025 05:06:07 +0000 (08:06 +0300)
commitbe9075c7c925459b69d52a27d552f823916f2512
treea61d5c17e607964715f6746f4678184ac4cce874
parent3a184ef664c1565cf34af5a8ec5dbb8b3b010a23
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