target/alpha: Log temp leaks
authorRichard Henderson <rth@twiddle.net>
Thu, 13 Jul 2017 23:55:05 +0000 (13:55 -1000)
committerRichard Henderson <rth@twiddle.net>
Wed, 19 Jul 2017 04:42:05 +0000 (18:42 -1000)
Tested-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
target/alpha/translate.c

index aaaf28fb18f197759b7f8723b1d91f025ad1c974..90e6d5285f0affd1f7f84670472fee0341a6f7c9 100644 (file)
@@ -3013,6 +3013,8 @@ void gen_intermediate_code(CPUAlphaState *env, struct TranslationBlock *tb)
     }
 
     gen_tb_start(tb);
+    tcg_clear_temp_count();
+
     do {
         tcg_gen_insn_start(ctx.pc);
         num_insns++;
@@ -3035,6 +3037,10 @@ void gen_intermediate_code(CPUAlphaState *env, struct TranslationBlock *tb)
         ret = translate_one(ctxp, insn);
         free_context_temps(ctxp);
 
+        if (tcg_check_temp_count()) {
+            qemu_log("TCG temporary leak before "TARGET_FMT_lx"\n", ctx.pc);
+        }
+
         /* If we reach a page boundary, are single stepping,
            or exhaust instruction count, stop generation.  */
         if (ret == NO_EXIT