diff --git a/tcg/tcg.c b/tcg/tcg.c index 635555001b5394b21f8aed1e5d74e52a6ac6f4b7..08c3b5a002dc249c3f6c0a2daf407a7da3e36300 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);