aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authornotaz2011-01-25 00:58:13 +0200
committernotaz2011-01-25 00:58:13 +0200
commit7de557a6f7b032bd5bb5e0e5c8a6539b856d9c20 (patch)
treecdea9d4f1d2babefdec92098e3ff43d5c17363b8 /libpcsxcore
parenta64911708df86674a7a64e42782bf467abe9f0aa (diff)
downloadpcsx_rearmed-7de557a6f7b032bd5bb5e0e5c8a6539b856d9c20.tar.gz
pcsx_rearmed-7de557a6f7b032bd5bb5e0e5c8a6539b856d9c20.tar.bz2
pcsx_rearmed-7de557a6f7b032bd5bb5e0e5c8a6539b856d9c20.zip
drc: allow CFC1/2 to r0
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/new_dynarec/new_dynarec.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c
index 69e829f..aa1cc38 100644
--- a/libpcsxcore/new_dynarec/new_dynarec.c
+++ b/libpcsxcore/new_dynarec/new_dynarec.c
@@ -1783,16 +1783,17 @@ void cop1_alloc(struct regstat *current,int i)
alloc_reg(current,i,CSREG); // Load status
if(opcode2[i]<3) // MFC1/DMFC1/CFC1
{
- assert(rt1[i]);
- clear_const(current,rt1[i]);
- if(opcode2[i]==1) {
- alloc_reg64(current,i,rt1[i]); // DMFC1
- current->is32&=~(1LL<<rt1[i]);
- }else{
- alloc_reg(current,i,rt1[i]); // MFC1/CFC1
- current->is32|=1LL<<rt1[i];
+ if(rt1[i]){
+ clear_const(current,rt1[i]);
+ if(opcode2[i]==1) {
+ alloc_reg64(current,i,rt1[i]); // DMFC1
+ current->is32&=~(1LL<<rt1[i]);
+ }else{
+ alloc_reg(current,i,rt1[i]); // MFC1/CFC1
+ current->is32|=1LL<<rt1[i];
+ }
+ dirty_reg(current,rt1[i]);
}
- dirty_reg(current,rt1[i]);
alloc_reg_temp(current,i,-1);
}
else if(opcode2[i]>3) // MTC1/DMTC1/CTC1