qemu/target
Peter Maydell 87fd848729 target/arm: Don't assert for 128-bit tile accesses when SVL is 128
For an instruction which accesses a 128-bit element tile when
the SVL is also 128 (for example MOV z0.Q, p0/M, ZA0H.Q[w0,0]),
we will assert in get_tile_rowcol():

qemu-system-aarch64: ../../tcg/tcg-op.c:926: tcg_gen_deposit_z_i32: Assertion `len > 0' failed.

This happens because we calculate
    len = ctz32(streaming_vec_reg_size(s)) - esz;$
but if the SVL and the element size are the same len is 0, and
the deposit operation asserts.

In this case the ZA storage contains exactly one 128 bit
element ZA tile, and the horizontal or vertical slice is just
that tile. This means that regardless of the index value in
the Ws register, we always access that tile. (In pseudocode terms,
we calculate (index + offset) MOD 1, which is 0.)

Special case the len == 0 case to avoid hitting the assertion
in tcg_gen_deposit_z_i32().

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240722172957.1041231-2-peter.maydell@linaro.org
(cherry picked from commit 56f1c0db92)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2024-08-02 10:22:33 +03:00
..
alpha accel/tcg: Remove will_exit argument from cpu_restore_state 2022-11-01 08:31:41 +11:00
arm target/arm: Don't assert for 128-bit tile accesses when SVL is 128 2024-08-02 10:22:33 +03:00
avr target/avr: Convert to tcg_ops restore_state_to_opc 2022-10-26 11:11:28 +10:00
cris accel/tcg: Remove will_exit argument from cpu_restore_state 2022-11-01 08:31:41 +11:00
hexagon target/hexagon: Convert to tcg_ops restore_state_to_opc 2022-10-26 11:11:28 +10:00
hppa target/hppa: Clear psw_n for BE on use_nullify_skip path 2024-04-09 20:09:20 +03:00
i386 i386/cpu: fixup number of addressable IDs for processor cores in the physical package 2024-07-01 09:50:03 +03:00
loongarch target/loongarch: fix a wrong print in cpu dump 2024-06-07 08:10:49 +03:00
m68k target/m68k: Fix semihost lseek offset computation 2023-08-03 08:26:26 +03:00
microblaze accel/tcg: Remove will_exit argument from cpu_restore_state 2022-11-01 08:31:41 +11:00
mips target/mips: Fix TX79 LQ/SQ opcodes 2023-11-19 21:15:23 +03:00
nios2 target/nios2: Fix semihost lseek offset computation 2023-08-03 08:26:26 +03:00
openrisc accel/tcg: Remove will_exit argument from cpu_restore_state 2022-11-01 08:31:41 +11:00
ppc target/ppc: Fix lxv/stxv MSR facility check 2024-02-24 19:29:15 +03:00
riscv target/riscv: Fix mcycle/minstret increment behavior 2024-01-08 19:24:44 +03:00
rx target/rx: Use target_ulong for address in LI 2024-07-30 22:28:41 +03:00
s390x target/s390x: Fix LAE setting a wrong access register 2024-01-13 11:28:02 +03:00
sh4 target/sh4: add missing CHECK_NOT_DELAY_SLOT 2024-04-10 20:40:02 +03:00
sparc target/sparc: Convert to tcg_ops restore_state_to_opc 2022-10-26 11:11:28 +10:00
tricore target/tricore: Rename tricore_feature 2023-11-19 21:15:23 +03:00
xtensa target/xtensa: fix OOB TLB entry access 2024-01-27 18:05:30 +03:00
Kconfig hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00
meson.build target/loongarch: Add target build suport 2022-06-06 18:09:03 +00:00