[core] removed extra, unnecessary branch for the NORMAL case

This commit is contained in:
2015-12-18 21:20:10 -05:00
parent c1a78c2ba8
commit 7d944ac8f5
1 changed files with 2 additions and 4 deletions

View File

@ -301,22 +301,20 @@ void CInterpreterCPU::ExecuteCPU()
m_R4300i_Opcode[Opcode.op]();
NextTimer -= CountPerOp;
PROGRAM_COUNTER += 4;
switch (R4300iOp::m_NextInstruction)
{
case NORMAL:
PROGRAM_COUNTER += 4;
break;
case DELAY_SLOT:
R4300iOp::m_NextInstruction = JUMP;
PROGRAM_COUNTER += 4;
break;
case PERMLOOP_DO_DELAY:
R4300iOp::m_NextInstruction = PERMLOOP_DELAY_DONE;
PROGRAM_COUNTER += 4;
break;
case JUMP:
{
bool CheckTimer = (JumpToLocation < PROGRAM_COUNTER || TestTimer);
bool CheckTimer = (JumpToLocation < PROGRAM_COUNTER - 4 || TestTimer);
PROGRAM_COUNTER = JumpToLocation;
R4300iOp::m_NextInstruction = NORMAL;
if (CheckTimer)