qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tcg/i386: Set P_REXW in tcg_out_addi_ptr
@ 2023-05-12 17:17 Richard Henderson
  2023-05-16 20:11 ` Michael Tokarev
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2023-05-12 17:17 UTC (permalink / raw)
  To: qemu-devel

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>
---
 tcg/i386/tcg-target.c.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc
index a01bfad773..9fc5592f5d 100644
--- a/tcg/i386/tcg-target.c.inc
+++ b/tcg/i386/tcg-target.c.inc
@@ -1091,7 +1091,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)
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tcg/i386: Set P_REXW in tcg_out_addi_ptr
  2023-05-12 17:17 [PATCH] tcg/i386: Set P_REXW in tcg_out_addi_ptr Richard Henderson
@ 2023-05-16 20:11 ` Michael Tokarev
  2023-05-16 20:18   ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Tokarev @ 2023-05-16 20:11 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-stable

12.05.2023 20:17, Richard Henderson wrote:
> 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

This looks like stable-8.0 material.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tcg/i386: Set P_REXW in tcg_out_addi_ptr
  2023-05-16 20:11 ` Michael Tokarev
@ 2023-05-16 20:18   ` Richard Henderson
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2023-05-16 20:18 UTC (permalink / raw)
  To: Michael Tokarev, qemu-devel; +Cc: qemu-stable

On 5/16/23 13:11, Michael Tokarev wrote:
> 12.05.2023 20:17, Richard Henderson wrote:
>> 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
> 
> This looks like stable-8.0 material.

Yes indeed, please.

r~



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tcg/i386: Set P_REXW in tcg_out_addi_ptr
@ 2023-05-17 14:06 Evgeny Iakovlev
  0 siblings, 0 replies; 4+ messages in thread
From: Evgeny Iakovlev @ 2023-05-17 14:06 UTC (permalink / raw)
  To: richard.henderson, qemu-devel

A bit late to the party, but still

Tested-by: Evgeny Iakovlev <eiakovlev@linux.microsoft.com>




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-17 14:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-12 17:17 [PATCH] tcg/i386: Set P_REXW in tcg_out_addi_ptr Richard Henderson
2023-05-16 20:11 ` Michael Tokarev
2023-05-16 20:18   ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2023-05-17 14:06 Evgeny Iakovlev

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).