From de5f7d543f3979c94acc5bc244b5e1d8b30b919d Mon Sep 17 00:00:00 2001 From: zilmar Date: Sat, 20 Oct 2012 09:15:58 +1100 Subject: [PATCH] clean up pc == target for REGIMM_BGEZL --- .../Project64/N64 System/Recompiler/Code Block.cpp | 5 ++++- .../N64 System/Recompiler/Loop Analysis.cpp | 12 +++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Source/Project64/N64 System/Recompiler/Code Block.cpp b/Source/Project64/N64 System/Recompiler/Code Block.cpp index 347d8c64e..8be39f26c 100644 --- a/Source/Project64/N64 System/Recompiler/Code Block.cpp +++ b/Source/Project64/N64 System/Recompiler/Code Block.cpp @@ -433,7 +433,10 @@ bool CCodeBlock::AnalyzeInstruction ( DWORD PC, DWORD & TargetPC, DWORD & Contin TargetPC = PC + ((short)Command.offset << 2) + 4; if (TargetPC == PC) { - _Notify->BreakPoint(__FILE__,__LINE__); + if (!DelaySlotEffectsCompare(PC,Command.rs,0)) + { + PermLoop = true; + } } ContinuePC = PC + 8; LikelyBranch = true; diff --git a/Source/Project64/N64 System/Recompiler/Loop Analysis.cpp b/Source/Project64/N64 System/Recompiler/Loop Analysis.cpp index 4ea6c059f..3553b713a 100644 --- a/Source/Project64/N64 System/Recompiler/Loop Analysis.cpp +++ b/Source/Project64/N64 System/Recompiler/Loop Analysis.cpp @@ -268,17 +268,11 @@ bool LoopAnalysis::CheckLoopRegisterUsage( CCodeSection * Section) }*/ if (m_PC == m_PC + ((short)m_Command.offset << 2) + 4) { - _Notify->BreakPoint(__FILE__,__LINE__); -#ifdef tofix - if (!DelaySlotEffectsCompare(m_PC,m_Command.rs,m_Command.rt)) + if (!DelaySlotEffectsCompare(m_PC,m_Command.rs,0) && !Section->m_Jump.PermLoop) { - if (!Section->m_Jump.PermLoop) - { - _Notify->BreakPoint(__FILE__,__LINE__); - } + _Notify->BreakPoint(__FILE__,__LINE__); } -#endif - } + } #endif break; case R4300i_REGIMM_BLTZAL: