Fix loop analysis for BGEZ

This commit is contained in:
zilmar 2012-11-03 12:38:18 +11:00
parent 464c280fa6
commit f1a0c788ed
1 changed files with 18 additions and 15 deletions

View File

@ -412,13 +412,8 @@ bool CCodeBlock::AnalyzeInstruction ( DWORD PC, DWORD & TargetPC, DWORD & Contin
TargetPC = PC + ((short)Command.offset << 2) + 4; TargetPC = PC + ((short)Command.offset << 2) + 4;
if (TargetPC == PC + 8) if (TargetPC == PC + 8)
{ {
_Notify->BreakPoint(__FILE__,__LINE__); TargetPC = (DWORD)-1;
} } else {
IncludeDelaySlot = true;
if (Command.rs != 0)
{
ContinuePC = PC + 8;
}
if (TargetPC == PC) if (TargetPC == PC)
{ {
if (Command.rs == 0) if (Command.rs == 0)
@ -426,10 +421,18 @@ bool CCodeBlock::AnalyzeInstruction ( DWORD PC, DWORD & TargetPC, DWORD & Contin
TargetPC = (DWORD)-1; TargetPC = (DWORD)-1;
EndBlock = true; EndBlock = true;
} else { } else {
//if delay slot effects compare; if (!DelaySlotEffectsCompare(PC,Command.rs,Command.rt))
_Notify->BreakPoint(__FILE__,__LINE__); {
PermLoop = true;
} }
} }
}
if (Command.rs != 0)
{
ContinuePC = PC + 8;
}
IncludeDelaySlot = true;
}
break; break;
case R4300i_REGIMM_BLTZL: case R4300i_REGIMM_BLTZL:
case R4300i_REGIMM_BGEZL: case R4300i_REGIMM_BGEZL: