target-arm: Use TCG temporary leak debugging facilities
authorPeter Maydell <peter.maydell@linaro.org>
Sun, 6 Mar 2011 21:39:55 +0000 (21:39 +0000)
committerAurelien Jarno <aurelien@aurel32.net>
Mon, 7 Mar 2011 08:26:18 +0000 (09:26 +0100)
Use the new TCG temporary leak debugging facilities to
check that each ARM instruction does not leak temporaries.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm/translate.c

index e01c8cd304015a0e4a6921899f6aaf4641e85c3a..91203c2407ffdc365415de5209a8fa5dbc70696f 100644 (file)
@@ -9149,6 +9149,8 @@ static inline void gen_intermediate_code_internal(CPUState *env,
 
     gen_icount_start();
 
+    tcg_clear_temp_count();
+
     /* A note on handling of the condexec (IT) bits:
      *
      * We want to avoid the overhead of having to write the updated condexec
@@ -9258,6 +9260,11 @@ static inline void gen_intermediate_code_internal(CPUState *env,
             gen_set_label(dc->condlabel);
             dc->condjmp = 0;
         }
+
+        if (tcg_check_temp_count()) {
+            fprintf(stderr, "TCG temporary leak before %08x\n", dc->pc);
+        }
+
         /* Translation stops when a conditional branch is encountered.
          * Otherwise the subsequent code could get translated several times.
          * Also stop translation when a page boundary is reached.  This