X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fnew_dynarec%2Fnew_dynarec.c;h=b6af4c4b54df79c0570a28e834500f915746775d;hb=7841712d55378f557c1f08ac3445f3b3d66c7691;hp=37706bc3fbcee2ae1763dd97c9d1052bccf3be84;hpb=cbbd8dd7705d5cb7c748a7ffaf2ccc74893b3910;p=pcsx_rearmed.git diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 37706bc3..b6af4c4b 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -3332,10 +3332,24 @@ void store_assemble(int i,struct regstat *i_regs) #endif } } + u_int addr_val=constmap[i][s]+offset; 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); + inline_writestub(type,i,addr_val,i_regs->regmap,rs2[i],ccadj[i],reglist); + } + // basic current block modification detection.. + // not looking back as that should be in mips cache already + if(c&&start+i*4regmap==regs[i].regmap); // not delay slot + if(i_regs->regmap==regs[i].regmap) { + load_all_consts(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty,i); + wb_dirtys(regs[i].regmap_entry,regs[i].was32,regs[i].wasdirty); + emit_movimm(start+i*4+4,0); + emit_writeword(0,(int)&pcaddr); + emit_jmp((int)do_interrupt); + } } //if(opcode[i]==0x2B || opcode[i]==0x3F) //if(opcode[i]==0x2B || opcode[i]==0x28)