[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.13 13/17] target/arm: Fix VCMLA Dd, Dn, Dm[idx]
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.13 13/17] target/arm: Fix VCMLA Dd, Dn, Dm[idx] |
Date: |
Thu, 4 Jul 2024 15:48:20 +0300 |
From: Richard Henderson <richard.henderson@linaro.org>
The inner loop, bounded by eltspersegment, must not be
larger than the outer loop, bounded by elements.
Cc: qemu-stable@nongnu.org
Fixes: 18fc2405781 ("target/arm: Implement SVE fp complex multiply add
(indexed)")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2376
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240625183536.1672454-2-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 76bccf3cb9d9383da0128bbc6d1300cddbe3ae8f)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/arm/vec_helper.c b/target/arm/vec_helper.c
index f59d3b26ea..859366e264 100644
--- a/target/arm/vec_helper.c
+++ b/target/arm/vec_helper.c
@@ -842,7 +842,7 @@ void HELPER(gvec_fcmlah_idx)(void *vd, void *vn, void *vm,
void *va,
intptr_t index = extract32(desc, SIMD_DATA_SHIFT + 2, 2);
uint32_t neg_real = flip ^ neg_imag;
intptr_t elements = opr_sz / sizeof(float16);
- intptr_t eltspersegment = 16 / sizeof(float16);
+ intptr_t eltspersegment = MIN(16 / sizeof(float16), elements);
intptr_t i, j;
/* Shift boolean to the sign bit so we can xor to negate. */
@@ -904,7 +904,7 @@ void HELPER(gvec_fcmlas_idx)(void *vd, void *vn, void *vm,
void *va,
intptr_t index = extract32(desc, SIMD_DATA_SHIFT + 2, 2);
uint32_t neg_real = flip ^ neg_imag;
intptr_t elements = opr_sz / sizeof(float32);
- intptr_t eltspersegment = 16 / sizeof(float32);
+ intptr_t eltspersegment = MIN(16 / sizeof(float32), elements);
intptr_t i, j;
/* Shift boolean to the sign bit so we can xor to negate. */
--
2.39.2
- [Stable-7.2.13 04/17] linux-user: Make TARGET_NR_setgroups affect only the current thread, (continued)
- [Stable-7.2.13 04/17] linux-user: Make TARGET_NR_setgroups affect only the current thread, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 05/17] tcg/loongarch64: Fix tcg_out_movi vs some pcrel pointers, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 06/17] gitlab-ci.d/buildtest: Merge the --without-default-* jobs, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 07/17] Update lcitool and fedora to 37, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 09/17] tests: Update our CI to use CentOS Stream 9 instead of 8, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 08/17] ci, docker: update CentOS and OpenSUSE Python to non-EOL versions, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 10/17] tests: don't run benchmarks for the tsan build, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 11/17] gitlab-ci: Disable the riscv64-debian-cross-container by default, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 12/17] i386/cpu: fixup number of addressable IDs for processor cores in the physical package, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 15/17] iotests/244: Don't store data-file with protocol in image, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 13/17] target/arm: Fix VCMLA Dd, Dn, Dm[idx],
Michael Tokarev <=
- [Stable-7.2.13 16/17] iotests/270: Don't store data-file with json: prefix in image, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 14/17] qcow2: Don't open data_file with BDRV_O_NO_IO, Michael Tokarev, 2024/07/04
- [Stable-7.2.13 17/17] block: Parse filenames only when explicitly requested, Michael Tokarev, 2024/07/04