Core: in CRecompiler::RecompilerMain_Lookup when TriggerAddressException has occured, update the PC before checking if valid

This commit is contained in:
zilmar 2025-02-13 12:22:52 +10:30
parent 8ae9d7b9ff
commit a5a2c8cf6d
1 changed files with 2 additions and 2 deletions

View File

@ -138,13 +138,13 @@ void CRecompiler::RecompilerMain_Lookup()
if (!m_MMU.VAddrToPAddr((uint32_t)PROGRAM_COUNTER, PhysicalAddr))
{
m_Reg.TriggerAddressException(PROGRAM_COUNTER, EXC_RMISS);
PROGRAM_COUNTER = m_System.m_JumpToLocation;
m_System.m_PipelineStage = PIPELINE_STAGE_NORMAL;
if (!m_MMU.VAddrToPAddr((uint32_t)PROGRAM_COUNTER, PhysicalAddr))
{
g_Notify->DisplayError(stdstr_f("Failed to translate PC to a PAddr: %X\n\nEmulation stopped", PROGRAM_COUNTER).c_str());
m_EndEmulation = true;
}
PROGRAM_COUNTER = m_System.m_JumpToLocation;
m_System.m_PipelineStage = PIPELINE_STAGE_NORMAL;
continue;
}
if (PhysicalAddr < m_System.RdramSize())