mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 07:35:41 +00:00
CPU/CachedInterpreter: Fix infinite loop when block compile fails
This commit is contained in:
parent
58f5c99100
commit
dd5277321b
|
@ -194,6 +194,7 @@ static void ExecuteImpl()
|
|||
if (!block)
|
||||
{
|
||||
InterpretUncachedBlock<pgxp_mode>();
|
||||
next_block_key = GetNextBlockKey();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -1918,7 +1918,8 @@ template<PGXPMode pgxp_mode>
|
|||
void InterpretUncachedBlock()
|
||||
{
|
||||
g_state.regs.npc = g_state.regs.pc;
|
||||
FetchInstruction();
|
||||
if (!FetchInstruction())
|
||||
return;
|
||||
|
||||
// At this point, pc contains the last address executed (in the previous block). The instruction has not been fetched
|
||||
// yet. pc shouldn't be updated until the fetch occurs, that way the exception occurs in the delay slot.
|
||||
|
|
Loading…
Reference in a new issue