Skip to content

Commit

Permalink
Merge pull request #2888 from degasus/jit64
Browse files Browse the repository at this point in the history
Jit64: Faster linking of continuous blocks
  • Loading branch information
degasus committed Aug 23, 2015
2 parents 2a1abf8 + 78aa01e commit 73067b1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Source/Core/Core/PowerPC/JitCommon/JitCache.cpp
Expand Up @@ -324,9 +324,20 @@ using namespace Gen;
{
XEmitter emit(location);
if (*location == 0xE8)
{
emit.CALL(address);
}
else
emit.JMP(address, true);
{
// If we're going to link with the next block, there is no need
// to emit JMP. So just NOP out the gap to the next block.
// Support up to 3 additional bytes because of alignment.
s64 offset = address - emit.GetCodePtr();
if (offset > 0 && offset <= 5 + 3)
emit.NOP(offset);
else
emit.JMP(address, true);
}
}

void JitBlockCache::WriteDestroyBlock(const u8* location, u32 address)
Expand Down

0 comments on commit 73067b1

Please sign in to comment.