qemu/target/arm/tcg
Peter Maydell 570e624426 target/arm: Fix A64 scalar SQSHRN and SQRSHRN
In commit 1b7bc9b5c8 we changed handle_vec_simd_sqshrn() so
that instead of starting with a 0 value and depositing in each new
element from the narrowing operation, it instead started with the raw
result of the narrowing operation of the first element.

This is fine in the vector case, because the deposit operations for
the second and subsequent elements will always overwrite any higher
bits that might have been in the first element's result value in
tcg_rd.  However in the scalar case we only go through this loop
once.  The effect is that for a signed narrowing operation, if the
result is negative then we will now return a value where the bits
above the first element are incorrectly 1 (because the narrowfn
returns a sign-extended result, not one that is truncated to the
element size).

Fix this by using an extract operation to get exactly the correct
bits of the output of the narrowfn for element 1, instead of a
plain move.

Cc: qemu-stable@nongnu.org
Fixes: 1b7bc9b5c8 ("target/arm: Avoid tcg_const_ptr in handle_vec_simd_sqshrn")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2089
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240123153416.877308-1-peter.maydell@linaro.org
(cherry picked from commit 6fffc83785)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2024-01-27 18:10:44 +03:00
..
a32-uncond.decode
a32.decode
a64.decode target/arm: Fix A64 LDRA immediate decode 2023-11-06 15:00:29 +00:00
arm_ldst.h target/arm: Move translate-a32.h, arm_ldst.h, sve_ldst_internal.h to tcg/ 2023-05-12 15:43:36 +01:00
cpu32.c target/arm/tcg: enable PMU feature for Cortex-A8 and A9 2023-11-13 16:31:41 +00:00
cpu64.c target/arm: enable FEAT_RNG on Neoverse-N2 2023-11-20 15:09:42 +00:00
crypto_helper.c crypto: Create sm4_subword 2023-09-11 11:45:55 +10:00
helper-a64.c target/arm/tcg: spelling fixes: alse, addreses 2023-11-15 11:59:54 +03:00
helper-a64.h target/arm: Implement the CPY* instructions 2023-09-21 16:07:14 +01:00
helper-mve.h target/arm: Move helper-{a64,mve,sme,sve}.h to tcg/ 2023-05-12 15:43:37 +01:00
helper-sme.h target/arm: Move helper-{a64,mve,sme,sve}.h to tcg/ 2023-05-12 15:43:37 +01:00
helper-sve.h target/arm: Move helper-{a64,mve,sme,sve}.h to tcg/ 2023-05-12 15:43:37 +01:00
hflags.c target/arm/tcg: spelling fixes: alse, addreses 2023-11-15 11:59:54 +03:00
iwmmxt_helper.c
m_helper.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
m-nocp.decode
meson.build target/arm/tcg: Don't build AArch64 decodetree files for qemu-system-arm 2023-07-31 11:41:21 +01:00
mte_helper.c target/arm: Correct MTE tag checking for reverse-copy MOPS 2023-11-13 13:15:50 +00:00
mve_helper.c target/arm/tcg: Clean up local variable shadowing 2023-09-29 10:07:14 +02:00
mve.decode
neon_helper.c
neon-dp.decode
neon-ls.decode
neon-shared.decode
op_helper.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
pauth_helper.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
psci.c target/arm: Move psci.c into the tcg directory 2023-02-27 13:27:04 +00:00
sme_helper.c target/arm: Fix SME FMOPA (16-bit), BFMOPA 2023-11-20 15:17:00 +00:00
sme-fa64.decode
sme.decode
sve_helper.c target/arm: Replace TARGET_PAGE_ENTRY_EXTRA 2023-10-03 08:01:02 -07:00
sve_ldst_internal.h target/arm: Move translate-a32.h, arm_ldst.h, sve_ldst_internal.h to tcg/ 2023-05-12 15:43:36 +01:00
sve.decode target/arm: Demultiplex AESE and AESMC 2023-07-08 07:30:18 +01:00
t16.decode
t32.decode
tlb_helper.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
translate-a32.h tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-a64.c target/arm: Fix A64 scalar SQSHRN and SQRSHRN 2024-01-27 18:10:44 +03:00
translate-a64.h tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-m-nocp.c tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-mve.c tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-neon.c tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-sme.c tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-sve.c target/arm: Fix SVE STR increment 2023-11-02 13:36:45 +00:00
translate-vfp.c tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate.c target/arm: Permit T32 LDM with single register 2023-10-19 14:32:13 +01:00
translate.h target/arm: Fix A64 LDRA immediate decode 2023-11-06 15:00:29 +00:00
vec_helper.c target/arm: Use clmul_64 2023-09-15 13:57:00 +00:00
vec_internal.h target/arm: Use clmul_16* routines 2023-09-15 13:57:00 +00:00
vfp-uncond.decode
vfp.decode