CPU: Skip executing nop instructions

Makes PGXP CPU mode quicker, as well as a performance improvement to the
regular interpreter.
This commit is contained in:
Connor McLaughlin 2020-08-19 23:38:05 +10:00
parent 2e9f656546
commit daa72aba10
1 changed files with 4 additions and 0 deletions

View File

@ -477,6 +477,10 @@ ALWAYS_INLINE_RELEASE static void ExecuteInstruction()
LogInstruction(inst.bits, g_state.current_instruction_pc, &g_state.regs);
#endif
// Skip nops. Makes PGXP-CPU quicker, but also the regular interpreter.
if (inst.bits == 0)
return;
switch (inst.op)
{
case InstructionOp::funct: