[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.2.1 62/71] tcg/arm: Fix SIGILL in tcg_out_qemu_st_direct
From: |
Michael Tokarev |
Subject: |
[Stable-8.2.1 62/71] tcg/arm: Fix SIGILL in tcg_out_qemu_st_direct |
Date: |
Sun, 28 Jan 2024 20:50:25 +0300 |
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>
(cherry picked from commit 9f6523e8e4689cafdbed7c10b7cf7c775b5a607b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
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.39.2
- [Stable-8.2.1 00/71] Patch Round-up for stable 8.2.1, frozen on 2024-01-27, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 57/71] tcg/s390x: Fix encoding of VRIc, VRSa, VRSc insns, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 61/71] linux-user/riscv: Adjust vdso signal frame cfa offsets, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 62/71] tcg/arm: Fix SIGILL in tcg_out_qemu_st_direct,
Michael Tokarev <=
- [Stable-8.2.1 56/71] accel/tcg: Revert mapping of PCREL translation block to multiple virtual addresses, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 55/71] acpi/tests/avocado/bits: wait for 200 seconds for SHUTDOWN event from bits VM, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 65/71] iotests: add filter_qmp_generated_node_ids(), Michael Tokarev, 2024/01/28
- [Stable-8.2.1 60/71] linux-user: Fixed cpu restore with pc 0 on SIGBUS, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 64/71] block/blklogwrites: Fix a bug when logging "write zeroes" operations., Michael Tokarev, 2024/01/28
- [Stable-8.2.1 59/71] block/io: clear BDRV_BLOCK_RECURSE flag after recursing in bdrv_co_block_status, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 66/71] iotests: port 141 to Python for reliable QMP testing, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 58/71] coroutine-ucontext: Save fake stack for pooled coroutine, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 63/71] virtio-net: correctly copy vnet header when flushing TX, Michael Tokarev, 2024/01/28
- [Stable-8.2.1 67/71] monitor: only run coroutine commands in qemu_aio_context, Michael Tokarev, 2024/01/28