* [PATCH] tcg/arm: Fix SIGILL in tcg_out_qemu_st_direct
@ 2024-01-21 21:14 Joseph Burt
2024-01-23 3:31 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Joseph Burt @ 2024-01-21 21:14 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Richard Henderson, open list:ARM TCG target
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>
---
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.42.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tcg/arm: Fix SIGILL in tcg_out_qemu_st_direct
2024-01-21 21:14 [PATCH] tcg/arm: Fix SIGILL in tcg_out_qemu_st_direct Joseph Burt
@ 2024-01-23 3:31 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2024-01-23 3:31 UTC (permalink / raw)
To: Joseph Burt, qemu-devel; +Cc: qemu-stable, open list:ARM TCG target
On 1/22/24 07:14, Joseph Burt wrote:
> 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>
> ---
> tcg/arm/tcg-target.c.inc | 3 +++
> 1 file changed, 3 insertions(+)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-23 3:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-21 21:14 [PATCH] tcg/arm: Fix SIGILL in tcg_out_qemu_st_direct Joseph Burt
2024-01-23 3:31 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).