aboutsummaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-04-07 12:00:22 -0700
committerRichard Henderson <richard.henderson@linaro.org>2023-04-10 08:29:24 -0700
commit7d9e1ee424b06a43708be02474e6714962cfee92 (patch)
treeafd62a2a35eea0c3c4aff30af76a1ca7cb557b7c /tcg
parent08dede07030973c1053868bc64de7e10bfa02ad6 (diff)
downloadqemu-7d9e1ee424b06a43708be02474e6714962cfee92.zip
qemu-7d9e1ee424b06a43708be02474e6714962cfee92.tar.gz
qemu-7d9e1ee424b06a43708be02474e6714962cfee92.tar.bz2
tcg/i386: Adjust assert in tcg_out_addi_ptr
We can arrive here on _WIN64 because Int128 is passed by reference. Change the assert to check that the immediate is in range, instead of attempting to check the host ABI. Fixes: 6a6d772e30d ("tcg: Introduce tcg_out_addi_ptr") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1581 Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/i386/tcg-target.c.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc
index 4444eb9..5a151fe 100644
--- a/tcg/i386/tcg-target.c.inc
+++ b/tcg/i386/tcg-target.c.inc
@@ -1082,7 +1082,7 @@ static void tcg_out_addi_ptr(TCGContext *s, TCGReg rd, TCGReg rs,
tcg_target_long imm)
{
/* This function is only used for passing structs by reference. */
- tcg_debug_assert(TCG_TARGET_REG_BITS == 32);
+ tcg_debug_assert(imm == (int32_t)imm);
tcg_out_modrm_offset(s, OPC_LEA, rd, rs, imm);
}