From f1b3b36958ea1bb74c86b3480dfb3144060fdb0c Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 13 Jan 2011 13:29:44 +0200 Subject: [PATCH] drc: check for r0 dest (it might be allocated) --- libpcsxcore/new_dynarec/assem_arm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.39.5