From: notaz Date: Sun, 18 Sep 2011 16:45:38 +0000 (+0300) Subject: drc: fix $ra evicting on JAL X-Git-Tag: r10~47 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=748406cf9b74d0cd0537768d68cbae926394ea5b;p=pcsx_rearmed.git drc: fix $ra evicting on JAL hopefully for good this time --- diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 05c54eec..573d0cdb 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -690,6 +690,10 @@ void lsn(u_char hsn[], int i, int *preferred_reg) hsn[RHASH]=1; hsn[RHTBL]=1; } + // due to the way JAL is currently done we need DS not to evict $ra + if(i>0&&itype[i-1]==UJUMP&&rt1[i-1]==31) { + hsn[31]=0; + } // Coprocessor load/store needs FTEMP, even if not declared if(itype[i]==C1LS||itype[i]==C2LS) { hsn[FTEMP]=0;