RSP: Make sure RSP block ends with a ret

This commit is contained in:
zilmar 2024-07-06 19:36:10 +09:30
parent 9b38977b31
commit e2243fe8eb
1 changed files with 5 additions and 0 deletions

View File

@ -930,6 +930,11 @@ void CompilerRSPBlock(void)
EndPC = *PrgCount;
}
} while (NextInstruction != RSPPIPELINE_FINISH_BLOCK && (CompilePC < EndPC || NextInstruction == RSPPIPELINE_DELAY_SLOT || NextInstruction == RSPPIPELINE_DELAY_SLOT_DONE));
if (CompilePC >= EndPC)
{
MoveConstToVariable((CompilePC & 0xFFC), PrgCount, "RSP PC");
Ret();
}
CPU_Message("===== End of recompiled code =====");
if (Compiler.bReOrdering)