drc: try harder to mark upper regs as unneeded
authornotaz <notasas@gmail.com>
Tue, 7 Dec 2010 16:23:43 +0000 (18:23 +0200)
committernotaz <notasas@gmail.com>
Tue, 14 Dec 2010 13:25:04 +0000 (15:25 +0200)
libpcsxcore/new_dynarec/new_dynarec.c

index 7495875..013af9b 100644 (file)
@@ -6697,9 +6697,6 @@ void unneeded_registers(int istart,int iend,int r)
     // Save it
     unneeded_reg[i]=u;
     unneeded_reg_upper[i]=uu;
-#ifdef FORCE32
-    unneeded_reg_upper[i]=-1LL;
-#endif
     /*
     printf("ur (%d,%d) %x: ",istart,iend,start+i*4);
     printf("U:");
@@ -6721,6 +6718,12 @@ void unneeded_registers(int istart,int iend,int r)
     }
     printf("\n");*/
   }
+#ifdef FORCE32
+  for (i=iend;i>=istart;i--)
+  {
+    unneeded_reg_upper[i]=branch_unneeded_reg_upper[i]=-1LL;
+  }
+#endif
 }
 
 // Identify registers which are likely to contain 32-bit values