Skip to contentSkip to conversation

target/arm: Fix sve prediate store, 8 <= VQ <= 15

PATCH Applied Richard Henderson 2 participants 3 messages Jun 20, 2023 – Jun 23, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/arm: Fix sve prediate store, 8 <= VQ <= 15

Brown bag time: store instead of load results in uninitialized temp.

Fixes e6dd5e782be ("target/arm: Use tcg_gen_qemu_{ld, st}_i128 in gen_sve_{ld, st}r")
---
 target/arm/tcg/translate-sve.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/arm/tcg/translate-sve.c +1 -1
index ff050626e6..225d358922 100644
@@ -4329,7 +4329,7 @@ void gen_sve_str(DisasContext *s, TCGv_ptr base, int vofs,
     /* Predicate register stores can be any multiple of 2.  */
     if (len_remain >= 8) {
         t0 = tcg_temp_new_i64();
-        tcg_gen_st_i64(t0, base, vofs + len_align);
+        tcg_gen_ld_i64(t0, base, vofs + len_align);
         tcg_gen_qemu_st_i64(t0, clean_addr, midx, MO_LEUQ | MO_ATOM_NONE);
         len_remain -= 8;
         len_align += 8;
Signature · 1 line
2.34.1
#1 lore raw
Quoted 9 lines · Richard Henderson

Brown bag time: store instead of load results in uninitialized temp.

Fixes e6dd5e782be ("target/arm: Use tcg_gen_qemu_{ld, st}_i128 in gen_sve_{ld, st}r")
---
  target/arm/tcg/translate-sve.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1704

r~

#2 lore raw
In reply to Richard Henderson
Quoted 8 lines · Richard Henderson

Brown bag time: store instead of load results in uninitialized temp.

Fixes e6dd5e782be ("target/arm: Use tcg_gen_qemu_{ld, st}_i128 in gen_sve_{ld, st}r")

--

Applied to target-arm.next (with the subject message typo fixed and the Resolves: line added), thanks.

-- PMM