Core: Update when branch goes to the opcode after the delay slot

This commit is contained in:
zilmar 2022-09-05 19:42:22 +09:30
parent 8a01017ef5
commit c380571d8b
1 changed files with 7 additions and 0 deletions

View File

@ -620,6 +620,13 @@ void CX86RecompilerOps::Compile_Branch(RecompilerBranchCompare CompareType, bool
}
else if (m_PipelineStage == PIPELINE_STAGE_DELAY_SLOT_DONE)
{
if (m_CompilePC + ((int16_t)m_Opcode.offset << 2) + 4 == m_CompilePC + 8)
{
m_PipelineStage = PIPELINE_STAGE_NORMAL;
m_RegWorkingSet.SetBlockCycleCount(m_RegWorkingSet.GetBlockCycleCount() - g_System->CountPerOp());
SetCurrentPC(GetCurrentPC() + 4);
return;
}
if (m_EffectDelaySlot)
{
CJumpInfo * FallInfo = m_Section->m_Jump.FallThrough ? &m_Section->m_Jump : &m_Section->m_Cont;