diff --git a/src/core/cpu_code_cache.cpp b/src/core/cpu_code_cache.cpp index 9ca527e27..3cdc55a67 100644 --- a/src/core/cpu_code_cache.cpp +++ b/src/core/cpu_code_cache.cpp @@ -194,6 +194,7 @@ static void ExecuteImpl() if (!block) { InterpretUncachedBlock(); + next_block_key = GetNextBlockKey(); continue; } diff --git a/src/core/cpu_core.cpp b/src/core/cpu_core.cpp index 05fab21ab..72a63138e 100644 --- a/src/core/cpu_core.cpp +++ b/src/core/cpu_core.cpp @@ -1918,7 +1918,8 @@ template 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.