drc: detect dead gte reads too
authornotaz <notasas@gmail.com>
Sun, 23 Oct 2011 14:47:38 +0000 (17:47 +0300)
committernotaz <notasas@gmail.com>
Sun, 30 Oct 2011 21:48:08 +0000 (23:48 +0200)
libpcsxcore/new_dynarec/new_dynarec.c

index b2eb21b..4b70f33 100644 (file)
@@ -7015,6 +7015,8 @@ void unneeded_registers(int istart,int iend,int r)
     uu&=~(1LL<<us1[i]);
     uu&=~(1LL<<us2[i]);
     gte_u&=~gte_rs[i];
+    if(gte_rs[i]&&rt1[i]&&(unneeded_reg[i+1]&(1ll<<rt1[i])))
+      gte_u|=gte_rs[i];  // MFC2/CFC2 to dead register, unneeded
     // Source-target dependencies
     uu&=~(tdep<<dep1[i]);
     uu&=~(tdep<<dep2[i]);