]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/riscv: rvv: Fix unexpected behavior of vector reduction instructions when...
authorMax Chou <max.chou@sifive.com>
Fri, 24 Jan 2025 10:14:47 +0000 (18:14 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 22 Mar 2025 07:52:25 +0000 (10:52 +0300)
commit39c62e22e15b427e257af69796619e2064b27add
tree8deedabf1cf9c8d64b245368ebf37f4bd96ee0b0
parent3e59a2255d10d21e1900c6e2c10fbb2f99df96f6
target/riscv: rvv: Fix unexpected behavior of vector reduction instructions when vl is 0

According to the Vector Reduction Operations section in the RISC-V "V"
Vector Extension spec,
"If vl=0, no operation is performed and the destination register is not
updated."

The vd should be updated when vl is larger than 0.

Fixes: fe5c9ab1fc ("target/riscv: vector single-width integer reduction instructions")
Fixes: f714361ed7 ("target/riscv: rvv-1.0: implement vstart CSR")
Signed-off-by: Max Chou <max.chou@sifive.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <20250124101452.2519171-1-max.chou@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
(cherry picked from commit ffd455963f230c7dc04965609d6675da687a5a78)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/riscv/vector_helper.c