diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-05-12 18:12:43 +0100 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2023-05-17 09:28:03 +0300 |
commit | 8c7966df7b0e1477acfbc2ca3365c4c6abe55203 (patch) | |
tree | d7775ccc158c6af38edbff24a8459bc7227e9bc4 | |
parent | 857f30a327775ab24989c9e20ee015724f3a16d4 (diff) | |
download | qemu-staging-8.0.tar.gz |
tcg/i386: Set P_REXW in tcg_out_addi_ptrstaging-8.0
The REXW bit must be set to produce a 64-bit pointer result; the
bit is disabled in 32-bit mode, so we can do this unconditionally.
Fixes: 7d9e1ee424b0 ("tcg/i386: Adjust assert in tcg_out_addi_ptr")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1592
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1642
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit 988998503bc6d8c03fbea001a0513e8372fddf28)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | tcg/i386/tcg-target.c.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index 5a151fe64a..5c7c180799 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -1083,7 +1083,7 @@ static void tcg_out_addi_ptr(TCGContext *s, TCGReg rd, TCGReg rs, { /* This function is only used for passing structs by reference. */ tcg_debug_assert(imm == (int32_t)imm); - tcg_out_modrm_offset(s, OPC_LEA, rd, rs, imm); + tcg_out_modrm_offset(s, OPC_LEA | P_REXW, rd, rs, imm); } static inline void tcg_out_pushi(TCGContext *s, tcg_target_long val) |