Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't waste time looking up the block if enableBlocklink is off anyway.
  • Loading branch information
comex committed Oct 9, 2013
1 parent 0dd3298 commit d5e40bf
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp
Expand Up @@ -298,18 +298,19 @@ void Jit64::WriteExit(u32 destination, int exit_num)
b->exitPtrs[exit_num] = GetWritableCodePtr();

// Link opportunity!
int block = blocks.GetBlockNumberFromStartAddress(destination);
if (block >= 0 && jo.enableBlocklink)
if (jo.enableBlocklink)
{
// It exists! Joy of joy!
JMP(blocks.GetBlock(block)->checkedEntry, true);
b->linkStatus[exit_num] = true;
}
else
{
MOV(32, M(&PC), Imm32(destination));
JMP(asm_routines.dispatcher, true);
int block = blocks.GetBlockNumberFromStartAddress(destination);
if (block >= 0)
{
// It exists! Joy of joy!
JMP(blocks.GetBlock(block)->checkedEntry, true);
b->linkStatus[exit_num] = true;
return;
}
}
MOV(32, M(&PC), Imm32(destination));
JMP(asm_routines.dispatcher, true);
}

void Jit64::WriteExitDestInEAX()
Expand Down

0 comments on commit d5e40bf

Please sign in to comment.