aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authornotaz2011-01-28 18:37:47 +0200
committernotaz2011-01-28 18:37:47 +0200
commit268690946c1b0883963cdeb85a4278a034bb9b72 (patch)
tree4013f74531ef0c2dff4abfde0bae681a175631c5 /libpcsxcore
parent7f457614c936a6f37d12c1885bd504a7a7823690 (diff)
downloadpcsx_rearmed-268690946c1b0883963cdeb85a4278a034bb9b72.tar.gz
pcsx_rearmed-268690946c1b0883963cdeb85a4278a034bb9b72.tar.bz2
pcsx_rearmed-268690946c1b0883963cdeb85a4278a034bb9b72.zip
drc: fall back to interpreter on delay slot link reg dependencies
perhaps until someone implements this in recompiler used by Tomb Raider 2 at least
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/new_dynarec/new_dynarec.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c
index abfd834..641c673 100644
--- a/libpcsxcore/new_dynarec/new_dynarec.c
+++ b/libpcsxcore/new_dynarec/new_dynarec.c
@@ -8419,6 +8419,17 @@ int new_recompile_block(int addr)
else ba[i]=-1;
/* Is this the end of the block? */
if(i>0&&(itype[i-1]==UJUMP||itype[i-1]==RJUMP||(source[i-1]>>16)==0x1000)) {
+#ifdef PCSX
+ // check for link register access in delay slot
+ int rt1_=rt1[i-1];
+ if(rt1_!=0&&(rs1[i]==rt1_||rs2[i]==rt1_||rt1[i]==rt1_||rt2[i]==rt1_)) {
+ printf("link access in delay slot @%08x (%08x)\n", addr + i*4, addr);
+ ba[i-1]=-1;
+ itype[i-1]=INTCALL;
+ done=2;
+ }
+ else
+#endif
if(rt1[i-1]==0) { // Continue past subroutine call (JAL)
done=2;
}