44 lines
1.4 KiB
Diff
44 lines
1.4 KiB
Diff
|
|
From 3fe3a7706b9cacefdebba10cfaa15d6286f6e91c Mon Sep 17 00:00:00 2001
|
||
|
|
From: Richard Henderson <richard.henderson@linaro.org>
|
||
|
|
Date: Wed, 16 Oct 2024 17:31:05 +0000
|
||
|
|
Subject: [PATCH] tcg: Reset data_gen_ptr correctly
|
||
|
|
|
||
|
|
This pointer needs to be reset after overflow just like
|
||
|
|
code_buf and code_ptr.
|
||
|
|
|
||
|
|
Cc: qemu-stable@nongnu.org
|
||
|
|
Fixes: 57a269469db ("tcg: Infrastructure for managing constant pools")
|
||
|
|
Acked-by: Alistair Francis <alistair.francis@wdc.com>
|
||
|
|
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
|
||
|
|
Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
|
||
|
|
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
|
||
|
|
(cherry picked from commit a7cfd751fb269de4a93bf1658cb13911c7ac77cc)
|
||
|
|
Signed-off-by: zhujun2 <zhujun2_yewu@cmss.chinamobile.com>
|
||
|
|
---
|
||
|
|
tcg/tcg.c | 2 +-
|
||
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/tcg/tcg.c b/tcg/tcg.c
|
||
|
|
index 635555001b..08c3b5a002 100644
|
||
|
|
--- a/tcg/tcg.c
|
||
|
|
+++ b/tcg/tcg.c
|
||
|
|
@@ -714,7 +714,6 @@ TranslationBlock *tcg_tb_alloc(TCGContext *s)
|
||
|
|
goto retry;
|
||
|
|
}
|
||
|
|
qatomic_set(&s->code_gen_ptr, next);
|
||
|
|
- s->data_gen_ptr = NULL;
|
||
|
|
return tb;
|
||
|
|
}
|
||
|
|
|
||
|
|
@@ -4276,6 +4275,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
|
||
|
|
*/
|
||
|
|
s->code_buf = tcg_splitwx_to_rw(tb->tc.ptr);
|
||
|
|
s->code_ptr = s->code_buf;
|
||
|
|
+ s->data_gen_ptr = NULL;
|
||
|
|
|
||
|
|
#ifdef TCG_TARGET_NEED_LDST_LABELS
|
||
|
|
QSIMPLEQ_INIT(&s->ldst_labels);
|
||
|
|
--
|
||
|
|
2.41.0.windows.1
|
||
|
|
|