diff --git a/Source/Project64/N64 System/Recompiler/Code Block.cpp b/Source/Project64/N64 System/Recompiler/Code Block.cpp index 707699b5e..acbca93db 100644 --- a/Source/Project64/N64 System/Recompiler/Code Block.cpp +++ b/Source/Project64/N64 System/Recompiler/Code Block.cpp @@ -471,7 +471,10 @@ bool CCodeBlock::AnalyzeInstruction ( DWORD PC, DWORD & TargetPC, DWORD & Contin if (Command.rs != 0 || Command.rt != 0) { ContinuePC = PC + 8; - } else if (TargetPC == PC) { + } + + if (TargetPC == PC && !DelaySlotEffectsCompare(PC,Command.rs,Command.rt)) + { PermLoop = true; } IncludeDelaySlot = true; @@ -571,8 +574,9 @@ bool CCodeBlock::AnalyzeInstruction ( DWORD PC, DWORD & TargetPC, DWORD & Contin case R4300i_LB: case R4300i_LH: case R4300i_LWL: case R4300i_LW: case R4300i_LBU: case R4300i_LHU: case R4300i_LWR: case R4300i_LWU: case R4300i_SB: case R4300i_SH: case R4300i_SWL: case R4300i_SW: - case R4300i_SWR: case R4300i_CACHE: case R4300i_LWC1: case R4300i_LDC1: - case R4300i_LD: case R4300i_SWC1: case R4300i_SDC1: case R4300i_SD: + case R4300i_SDL: case R4300i_SDR: case R4300i_SWR: case R4300i_CACHE: + case R4300i_LWC1: case R4300i_LDC1: case R4300i_LD: case R4300i_SWC1: + case R4300i_SDC1: case R4300i_SD: break; case R4300i_BEQL: TargetPC = PC + ((short)Command.offset << 2) + 4; diff --git a/Source/Project64/N64 System/Recompiler/Loop Analysis.cpp b/Source/Project64/N64 System/Recompiler/Loop Analysis.cpp index 6df925d57..cdd8b8aa7 100644 --- a/Source/Project64/N64 System/Recompiler/Loop Analysis.cpp +++ b/Source/Project64/N64 System/Recompiler/Loop Analysis.cpp @@ -784,7 +784,7 @@ bool LoopAnalysis::SyncRegState ( CRegInfo & RegSet, const CRegInfo& SyncReg ) CPU_Message(__FUNCTION__ ": Clear state %s RegEnter State: %X Jump Reg State: %X",CRegName::GPR[x],RegSet.MipsRegState(x),SyncReg.MipsRegState(x)); RegSet.SetMipsRegState(x,CRegInfo::STATE_MODIFIED); bChanged = true; - } else if (RegSet.IsConst(x) && RegSet.Is64Bit(x)) { + } else if (RegSet.IsConst(x) && RegSet.Is64Bit(x) && RegSet.cMipsReg_S(x) != SyncReg.cMipsReg_S(x)) { _Notify->BreakPoint(__FILE__,__LINE__); } }