qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH-for-10.0] tcg: Allocate TEMP_VAL_MEM frame in temp_load()
@ 2025-04-01 14:43 Philippe Mathieu-Daudé
  2025-04-01 15:02 ` Richard Henderson
  2025-04-03 23:02 ` Richard Henderson
  0 siblings, 2 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-04-01 14:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Emilio G . Cota, Stefan Weil, Paolo Bonzini, Richard Henderson,
	Philippe Mathieu-Daudé, Michael Tokarev, Helge Konetzka

Be sure to allocate the temp frame if it wasn't.

Fixes: c896fe29d6c ("TCG code generator")
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Reported-by: Helge Konetzka <hk@zapateado.de>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2891
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2899
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 tcg/tcg.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tcg/tcg.c b/tcg/tcg.c
index e8950df2ad3..dfd48b82642 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -4671,6 +4671,9 @@ static void temp_load(TCGContext *s, TCGTemp *ts, TCGRegSet desired_regs,
         ts->mem_coherent = 0;
         break;
     case TEMP_VAL_MEM:
+        if (!ts->mem_allocated) {
+            temp_allocate_frame(s, ts);
+        }
         reg = tcg_reg_alloc(s, desired_regs, allocated_regs,
                             preferred_regs, ts->indirect_base);
         tcg_out_ld(s, ts->type, reg, ts->mem_base->reg, ts->mem_offset);
-- 
2.47.1



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

end of thread, other threads:[~2025-04-03 23:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01 14:43 [PATCH-for-10.0] tcg: Allocate TEMP_VAL_MEM frame in temp_load() Philippe Mathieu-Daudé
2025-04-01 15:02 ` Richard Henderson
2025-04-01 15:12   ` Richard Henderson
2025-04-03 23:02 ` Richard Henderson

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