X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fnew_dynarec%2Fnew_dynarec.c;h=1d88454744fb3b88607e1ff489262eb60ccdba67;hb=47f3758357b605deeaefe94e457d28470bf5aaa3;hp=893f258c774246a261576ad4283fd4c4dded3466;hpb=b1570849e812cc98973c2efc0bee1e494fa39367;p=pcsx_rearmed.git diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 893f258c..1d884547 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(R) is currently done we need DS not to evict $ra + if(i>0&&(itype[i-1]==RJUMP||itype[i-1]!=UJUMP)&&rt1[i-1]!=0) { + hsn[rt1[i-1]]=0; + } // Coprocessor load/store needs FTEMP, even if not declared if(itype[i]==C1LS||itype[i]==C2LS) { hsn[FTEMP]=0; @@ -5245,15 +5249,6 @@ void rjump_assemble(int i,struct regstat *i_regs) if(rh>=0) do_preload_rhash(rh); } #endif - ds_assemble(i+1,i_regs); - uint64_t bc_unneeded=branch_regs[i].u; - uint64_t bc_unneeded_upper=branch_regs[i].uu; - bc_unneeded|=1|(1LL<>16)^return_address)&0xFFFF]); #endif } + ds_assemble(i+1,i_regs); + uint64_t bc_unneeded=branch_regs[i].u; + uint64_t bc_unneeded_upper=branch_regs[i].uu; + bc_unneeded|=1|(1LL<