[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-9.0.4 03/57] tcg: Fix iteration step in 32-bit gvec operation
From: |
Michael Tokarev |
Subject: |
[Stable-9.0.4 03/57] tcg: Fix iteration step in 32-bit gvec operation |
Date: |
Sat, 9 Nov 2024 15:07:05 +0300 |
From: TANG Tiancheng <tangtiancheng.ttc@alibaba-inc.com>
The loop in the 32-bit case of the vector compare operation
was incorrectly incrementing by 8 bytes per iteration instead
of 4 bytes. This caused the function to process only half of
the intended elements.
Cc: qemu-stable@nongnu.org
Fixes: 9622c697d1 (tcg: Add gvec compare with immediate and scalar operand)
Signed-off-by: TANG Tiancheng <tangtiancheng.ttc@alibaba-inc.com>
Reviewed-by: Liu Zhiwei <zhiwei_liu@linux.alibaba.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240904142739.854-2-zhiwei_liu@linux.alibaba.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit 9d8d5a5b9078a16b4c0862fe54248c5cc8435648)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c
index bb88943f79..566fd6eef7 100644
--- a/tcg/tcg-op-gvec.c
+++ b/tcg/tcg-op-gvec.c
@@ -3925,7 +3925,7 @@ void tcg_gen_gvec_cmps(TCGCond cond, unsigned vece,
uint32_t dofs,
uint32_t i;
tcg_gen_extrl_i64_i32(t1, c);
- for (i = 0; i < oprsz; i += 8) {
+ for (i = 0; i < oprsz; i += 4) {
tcg_gen_ld_i32(t0, tcg_env, aofs + i);
tcg_gen_negsetcond_i32(cond, t0, t0, t1);
tcg_gen_st_i32(t0, tcg_env, dofs + i);
--
2.39.5
- [Stable-9.0.4 v1 00/57] Patch Round-up for stable 9.0.4, freeze on 2024-11-18, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 01/57] softmmu/physmem.c: Keep transaction attribute in address_space_map(), Michael Tokarev, 2024/11/09
- [Stable-9.0.4 02/57] target/arm: Correct ID_AA64ISAR1_EL1 value for neoverse-v1, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 03/57] tcg: Fix iteration step in 32-bit gvec operation,
Michael Tokarev <=
- [Stable-9.0.4 04/57] target/ppc: Fix lxvx/stxvx facility check, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 05/57] hw/mips/jazz: fix typo in in-built NIC alias, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 06/57] block/reqlist: allow adding overlapping requests, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 07/57] target/arm: Avoid target_ulong for physical address lookups, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 08/57] fuzz: disable leak-detection for oss-fuzz builds, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 09/57] testing: bump mips64el cross to bookworm and fix package list, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 10/57] vnc: fix crash when no console attached, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 11/57] linux-user/flatload: Take mmap_lock in load_flt_binary(), Michael Tokarev, 2024/11/09
- [Stable-9.0.4 13/57] tcg/ppc: Use TCG_REG_TMP2 for scratch tcg_out_qemu_st, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 12/57] linux-user: Fix parse_elf_properties GNU0_MAGIC check, Michael Tokarev, 2024/11/09