aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authornotaz2011-01-13 13:29:44 +0200
committernotaz2011-01-16 00:03:52 +0200
commitf1b3b36958ea1bb74c86b3480dfb3144060fdb0c (patch)
treea2ae04a95ff2de16d4539ed8005d79c914c10232 /libpcsxcore
parent7a481d40730f6de27b2daeed523d7162479f8ce5 (diff)
downloadpcsx_rearmed-f1b3b36958ea1bb74c86b3480dfb3144060fdb0c.tar.gz
pcsx_rearmed-f1b3b36958ea1bb74c86b3480dfb3144060fdb0c.tar.bz2
pcsx_rearmed-f1b3b36958ea1bb74c86b3480dfb3144060fdb0c.zip
drc: check for r0 dest (it might be allocated)
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/new_dynarec/assem_arm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpcsxcore/new_dynarec/assem_arm.c b/libpcsxcore/new_dynarec/assem_arm.c
index b6b856a..d18f09a 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)&reg_cop2c[copr],tl);
}
else if (opcode2[i]==6) // CTC2