[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/31] tcg: Fix iteration step in 32-bit gvec operation
From: |
Richard Henderson |
Subject: |
[PULL 03/31] tcg: Fix iteration step in 32-bit gvec operation |
Date: |
Sun, 22 Sep 2024 14:00:44 +0200 |
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>
---
tcg/tcg-op-gvec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c
index 0308732d9b..78ee1ced80 100644
--- a/tcg/tcg-op-gvec.c
+++ b/tcg/tcg-op-gvec.c
@@ -3939,7 +3939,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.43.0
- [PULL 07/31] tcg/i386: Do not expand cmpsel_vec early, (continued)
- [PULL 07/31] tcg/i386: Do not expand cmpsel_vec early, Richard Henderson, 2024/09/22
- [PULL 10/31] tcg/optimize: Fold movcond with true and false values identical, Richard Henderson, 2024/09/22
- [PULL 12/31] tcg/optimize: Optimize bitsel_vec, Richard Henderson, 2024/09/22
- [PULL 16/31] tcg/i386: Implement cmpsel_vec with avx512 insns, Richard Henderson, 2024/09/22
- [PULL 09/31] tcg/s390x: Do not expand cmp_vec early, Richard Henderson, 2024/09/22
- [PULL 24/31] linux-user, mips: update syscall-args-o32.c.inc to Linux v6.10, Richard Henderson, 2024/09/22
- [PULL 20/31] tcg/s390x: Implement cmpsel_vec, Richard Henderson, 2024/09/22
- [PULL 23/31] linux-user: update syscall_nr.h to Linux v6.10, Richard Henderson, 2024/09/22
- [PULL 26/31] linux-user,aarch64: move to syscalltbl file, Richard Henderson, 2024/09/22
- [PULL 04/31] tcg: Export vec_gen_6, Richard Henderson, 2024/09/22
- [PULL 03/31] tcg: Fix iteration step in 32-bit gvec operation,
Richard Henderson <=
- [PULL 19/31] tcg/ppc: Optimize cmpsel with constant 0/-1 arguments, Richard Henderson, 2024/09/22
- [PULL 28/31] linux-user,riscv: move to syscalltbl file, Richard Henderson, 2024/09/22
- [PULL 27/31] linux-user,openrisc: move to syscalltbl file, Richard Henderson, 2024/09/22
- [PULL 29/31] linux-user,hexagon: move to syscalltbl file, Richard Henderson, 2024/09/22
- [PULL 25/31] linux-user: update syscall.tbl to Linux v6.10, Richard Henderson, 2024/09/22
- [PULL 30/31] linux-user,loongarch: move to syscalltbl file, Richard Henderson, 2024/09/22
- [PULL 31/31] linux-user: update syscall.tbl to Linux v6.11, Richard Henderson, 2024/09/22
- Re: [PULL 00/31] tcg + linux-user patch queue, Peter Maydell, 2024/09/27