Skip to content
Snippets Groups Projects
Commit 7d9e1ee4 authored by Richard Henderson's avatar Richard Henderson
Browse files

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: 6a6d772e ("tcg: Introduce tcg_out_addi_ptr")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1581


Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
parent 08dede07
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment