]> git.proxmox.com Git - qemu.git/commitdiff
tcg: always mark dead input arguments as dead
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 9 Oct 2012 19:53:07 +0000 (21:53 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 28 Oct 2012 13:54:22 +0000 (14:54 +0100)
Always mark dead input arguments as dead, even if the op is at the basic
block end. This will allow to check that all temps are correctly saved.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg/tcg.c

index b219a6d227bdf2aced02d06888a70365a1d08724..d81b62883aba58524b5eda3314e8a2349b524266 100644 (file)
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1874,16 +1874,16 @@ static void tcg_reg_alloc_op(TCGContext *s,
     iarg_end: ;
     }
     
+    /* mark dead temporaries and free the associated registers */
+    for (i = nb_oargs; i < nb_oargs + nb_iargs; i++) {
+        if (IS_DEAD_ARG(i)) {
+            temp_dead(s, args[i]);
+        }
+    }
+
     if (def->flags & TCG_OPF_BB_END) {
         tcg_reg_alloc_bb_end(s, allocated_regs);
     } else {
-        /* mark dead temporaries and free the associated registers */
-        for(i = nb_oargs; i < nb_oargs + nb_iargs; i++) {
-            if (IS_DEAD_ARG(i)) {
-                temp_dead(s, args[i]);
-            }
-        }
-        
         if (def->flags & TCG_OPF_CALL_CLOBBER) {
             /* XXX: permit generic clobber register list ? */ 
             for(reg = 0; reg < TCG_TARGET_NB_REGS; reg++) {