Merge pull request #2888 from degasus/jit64
Jit64: Faster linking of continuous blocks
This commit is contained in:
commit
73067b1ef1
|
@ -324,10 +324,21 @@ using namespace Gen;
|
||||||
{
|
{
|
||||||
XEmitter emit(location);
|
XEmitter emit(location);
|
||||||
if (*location == 0xE8)
|
if (*location == 0xE8)
|
||||||
|
{
|
||||||
emit.CALL(address);
|
emit.CALL(address);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 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
|
else
|
||||||
emit.JMP(address, true);
|
emit.JMP(address, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void JitBlockCache::WriteDestroyBlock(const u8* location, u32 address)
|
void JitBlockCache::WriteDestroyBlock(const u8* location, u32 address)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue