From: notaz Date: Thu, 13 Jan 2011 11:29:44 +0000 (+0200) Subject: drc: check for r0 dest (it might be allocated) X-Git-Tag: r4~16 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1b3b36958ea1bb74c86b3480dfb3144060fdb0c;p=pcsx_rearmed.git drc: check for r0 dest (it might be allocated) --- diff --git a/libpcsxcore/new_dynarec/assem_arm.c b/libpcsxcore/new_dynarec/assem_arm.c index b6b856a6..d18f09a8 100644 --- a/libpcsxcore/new_dynarec/assem_arm.c +++ b/libpcsxcore/new_dynarec/assem_arm.c @@ -3373,7 +3373,7 @@ void cop0_assemble(int i,struct regstat *i_regs) signed char t=get_reg(i_regs->regmap,rt1[i]); char copr=(source[i]>>11)&0x1f; //assert(t>=0); // Why does this happen? OOT is weird - if(t>=0) { + if(t>=0&&rt1[i]!=0) { #ifdef MUPEN64 emit_addimm(FP,(int)&fake_pc-(int)&dynarec_local,0); emit_movimm((source[i]>>11)&0x1f,1); @@ -3594,7 +3594,7 @@ void cop2_assemble(int i,struct regstat *i_regs) signed char temp=get_reg(i_regs->regmap,-1); if (opcode2[i]==0) { // MFC2 signed char tl=get_reg(i_regs->regmap,rt1[i]); - if(tl>=0) + if(tl>=0&&rt1[i]!=0) cop2_get_dreg(copr,tl,temp); } else if (opcode2[i]==4) { // MTC2 @@ -3604,7 +3604,7 @@ void cop2_assemble(int i,struct regstat *i_regs) else if (opcode2[i]==2) // CFC2 { signed char tl=get_reg(i_regs->regmap,rt1[i]); - if(tl>=0) + if(tl>=0&&rt1[i]!=0) emit_readword((int)®_cop2c[copr],tl); } else if (opcode2[i]==6) // CTC2