[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 8/8] tcg/arm: Fix SIGILL in tcg_out_qemu_st_direct
|
From: |
Richard Henderson |
|
Subject: |
[PULL v2 8/8] tcg/arm: Fix SIGILL in tcg_out_qemu_st_direct |
|
Date: |
Tue, 23 Jan 2024 20:24:12 +1000 |
From: Joseph Burt <caseorum@gmail.com>
When tcg_out_qemu_st_{index,direct} were merged, the direct case for
MO_64 was omitted, causing qemu_st_i64 to be encoded as 0xffffffff due
to underflow when adding h.base and h.index.
Fixes: 1df6d611bdc2 ("tcg/arm: Introduce HostAddress")
Signed-off-by: Joseph Burt <caseorum@gmail.com>
Message-Id: <20240121211439.100829-1-caseorum@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/arm/tcg-target.c.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tcg/arm/tcg-target.c.inc b/tcg/arm/tcg-target.c.inc
index fc78566494..a9aa8aa91c 100644
--- a/tcg/arm/tcg-target.c.inc
+++ b/tcg/arm/tcg-target.c.inc
@@ -1662,6 +1662,9 @@ static void tcg_out_qemu_st_direct(TCGContext *s, MemOp
opc, TCGReg datalo,
} else {
tcg_out_strd_r(s, h.cond, datalo, h.base, h.index);
}
+ } else if (h.index < 0) {
+ tcg_out_st32_12(s, h.cond, datalo, h.base, 0);
+ tcg_out_st32_12(s, h.cond, datahi, h.base, 4);
} else if (h.index_scratch) {
tcg_out_st32_rwb(s, h.cond, datalo, h.index, h.base);
tcg_out_st32_12(s, h.cond, datahi, h.index, 4);
--
2.34.1
- [PULL v2 0/8] tcg pach queue, Richard Henderson, 2024/01/23
- [PULL v2 1/8] tcg: Remove unreachable code, Richard Henderson, 2024/01/23
- [PULL v2 2/8] tcg: Make the cleanup-on-error path unique, Richard Henderson, 2024/01/23
- [PULL v2 3/8] linux-user: Fixed cpu restore with pc 0 on SIGBUS, Richard Henderson, 2024/01/23
- [PULL v2 4/8] tcg/s390x: Fix encoding of VRIc, VRSa, VRSc insns, Richard Henderson, 2024/01/23
- [PULL v2 5/8] linux-user/riscv: Adjust vdso signal frame cfa offsets, Richard Henderson, 2024/01/23
- [PULL v2 7/8] linux-user/elfload: check PR_GET_DUMPABLE before creating coredump, Richard Henderson, 2024/01/23
- [PULL v2 6/8] linux-user/elfload: test return value of getrlimit, Richard Henderson, 2024/01/23
- [PULL v2 8/8] tcg/arm: Fix SIGILL in tcg_out_qemu_st_direct,
Richard Henderson <=
- Re: [PULL v2 0/8] tcg pach queue, Peter Maydell, 2024/01/25