aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.c
diff options
context:
space:
mode:
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r--tcg/tcg.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index dd74eabb0a..fd8a3dfe93 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -399,6 +399,7 @@ TranslationBlock *tcg_tb_alloc(TCGContext *s)
return NULL;
}
s->code_gen_ptr = next;
+ s->data_gen_ptr = NULL;
return tb;
}
@@ -2619,6 +2620,9 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
#ifdef TCG_TARGET_NEED_LDST_LABELS
s->ldst_labels = NULL;
#endif
+#ifdef TCG_TARGET_NEED_POOL_LABELS
+ s->pool_labels = NULL;
+#endif
num_insns = -1;
for (oi = s->gen_op_buf[0].next; oi != 0; oi = oi_next) {
@@ -2698,6 +2702,11 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
return -1;
}
#endif
+#ifdef TCG_TARGET_NEED_POOL_LABELS
+ if (!tcg_out_pool_finalize(s)) {
+ return -1;
+ }
+#endif
/* flush instruction cache */
flush_icache_range((uintptr_t)s->code_buf, (uintptr_t)s->code_ptr);