qemu/target
Chao Liu 4e9e2478df target/riscv: fix handling of nop for vstart >= vl in some vector instruction
Recently, when I was writing a RISCV test, I found that when VL is set to 0, the
instruction should be nop, but when I tested it, I found that QEMU will treat
all elements as tail elements, and in the case of VTA=1, write all elements
to 1.

After troubleshooting, it was found that the vext_vx_rm_1 function was called in
the vext_vx_rm_2, and then the vext_set_elems_1s function was called to process
the tail element, but only VSTART >= vl was checked in the vext_vx_rm_1
function, which caused the tail element to still be processed even if it was
returned in advance.

So I've made the following change:

Put VSTART_CHECK_EARLY_EXIT(env) at the beginning of the vext_vx_rm_2 function,
so that the VSTART register is checked correctly.

Fixes: df4252b2ec ("target/riscv/vector_helpers: do early exit when
vstart >= vl")
Signed-off-by: Chao Liu <lc00631@tecorigin.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <b2649f14915150be4c602d63cd3ea4adf47e9d75.1741573286.git.lc00631@tecorigin.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2025-03-19 16:40:42 +10:00
..
alpha target/alpha: Move has_work() from CPUClass to SysemuCPUOps 2025-03-09 17:00:47 +01:00
arm target/arm: Simplify pstate_sm check in sve_access_check 2025-03-14 12:54:33 +00:00
avr target/avr: Move has_work() from CPUClass to SysemuCPUOps 2025-03-09 17:00:47 +01:00
hexagon target/hexagon: Remove CPUClass:has_work() handler 2025-03-09 17:00:47 +01:00
hppa target/hppa: Move has_work() from CPUClass to SysemuCPUOps 2025-03-09 17:00:47 +01:00
i386 hw/hyperv/hyperv-proto: Move SYNDBG definitions from target/i386 2025-03-11 20:03:27 +01:00
loongarch target/loongarch: Move has_work() from CPUClass to SysemuCPUOps 2025-03-09 17:00:47 +01:00
m68k target/m68k: Move has_work() from CPUClass to SysemuCPUOps 2025-03-09 17:00:47 +01:00
microblaze target/microblaze: Move has_work() from CPUClass to SysemuCPUOps 2025-03-09 17:00:47 +01:00
mips target/mips: Move has_work() from CPUClass to SysemuCPUOps 2025-03-09 17:00:47 +01:00
openrisc target/openrisc: Move has_work() from CPUClass to SysemuCPUOps 2025-03-09 17:00:47 +01:00
ppc target/ppc: Avoid warning message for zero process table entries 2025-03-11 22:43:32 +10:00
riscv target/riscv: fix handling of nop for vstart >= vl in some vector instruction 2025-03-19 16:40:42 +10:00
rx target/rx: Move has_work() from CPUClass to SysemuCPUOps 2025-03-09 17:00:47 +01:00
s390x target/s390x: Move has_work() from CPUClass to SysemuCPUOps 2025-03-09 17:00:47 +01:00
sh4 target/sh4: Move has_work() from CPUClass to SysemuCPUOps 2025-03-09 17:00:47 +01:00
sparc target/sparc: Move has_work() from CPUClass to SysemuCPUOps 2025-03-09 17:00:47 +01:00
tricore target/tricore: Move has_work() from CPUClass to SysemuCPUOps 2025-03-09 17:00:47 +01:00
xtensa target/xtensa: Move has_work() from CPUClass to SysemuCPUOps 2025-03-09 17:00:47 +01:00
Kconfig target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00
meson.build target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00