drc: merge Ari64's patch: 10_unnecessary_invalidate
authornotaz <notasas@gmail.com>
Wed, 16 Feb 2011 21:52:36 +0000 (23:52 +0200)
committernotaz <notasas@gmail.com>
Thu, 17 Feb 2011 15:04:50 +0000 (17:04 +0200)
also adjust memhandlers to do inv checks as recompiler no longer does
them for unknown writes.

libpcsxcore/new_dynarec/new_dynarec.c
libpcsxcore/new_dynarec/pcsxmem.c

index 4fb5db9..84b4400 100644 (file)
@@ -3184,14 +3184,6 @@ void store_assemble(int i,struct regstat *i_regs)
     }
     type=STORED_STUB;
   }
-  if(!using_tlb&&(!c||memtarget))
-    // addr could be a temp, make sure it survives STORE*_STUB
-    reglist|=1<<addr;
-  if(jaddr) {
-    add_stub(type,jaddr,(int)out,i,addr,(int)i_regs,ccadj[i],reglist);
-  } else if(!memtarget) {
-    inline_writestub(type,i,constmap[i][s]+offset,i_regs->regmap,rs2[i],ccadj[i],reglist);
-  }
   if(!using_tlb) {
     if(!c||memtarget) {
       #ifdef DESTRUCTIVE_SHIFT
@@ -3211,6 +3203,11 @@ void store_assemble(int i,struct regstat *i_regs)
       add_stub(INVCODE_STUB,jaddr2,(int)out,reglist|(1<<HOST_CCREG),addr,0,0,0);
     }
   }
+  if(jaddr) {
+    add_stub(type,jaddr,(int)out,i,addr,(int)i_regs,ccadj[i],reglist);
+  } else if(c&&!memtarget) {
+    inline_writestub(type,i,constmap[i][s]+offset,i_regs->regmap,rs2[i],ccadj[i],reglist);
+  }
   //if(opcode[i]==0x2B || opcode[i]==0x3F)
   //if(opcode[i]==0x2B || opcode[i]==0x28)
   //if(opcode[i]==0x2B || opcode[i]==0x29)
index f5a78ff..ae35f2d 100644 (file)
@@ -350,9 +350,6 @@ void new_dyna_pcsx_mem_init(void)
                readmemb[i] = ari_read_ram8;
                readmemh[i] = ari_read_ram16;
                readmem[i] = ari_read_ram32;
-               writememb[i] = ari_write_ram8;
-               writememh[i] = ari_write_ram16;
-               writemem[i] = ari_write_ram32;
        }
 
        // BIOS and it's mirrors