JitCommon: Pass jit block instead of host pointer on linking.
So the JIT may do more fancy stuff.
This commit is contained in:
parent
cf3c65fbd0
commit
10e716c623
|
@ -198,6 +198,6 @@ void CachedInterpreter::WriteDestroyBlock(const u8* location, u32 address)
|
|||
{
|
||||
}
|
||||
|
||||
void CachedInterpreter::WriteLinkBlock(u8* location, const u8* address)
|
||||
void CachedInterpreter::WriteLinkBlock(u8* location, const JitBlock& block)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public:
|
|||
return "Cached Interpreter";
|
||||
}
|
||||
|
||||
void WriteLinkBlock(u8* location, const u8* address) override;
|
||||
void WriteLinkBlock(u8* location, const JitBlock& block) override;
|
||||
|
||||
void WriteDestroyBlock(const u8* location, u32 address) override;
|
||||
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
#include "Core/PowerPC/JitArm64/Jit.h"
|
||||
#include "Core/PowerPC/JitArm64/JitArm64Cache.h"
|
||||
|
||||
void JitArm64BlockCache::WriteLinkBlock(u8* location, const u8* address)
|
||||
void JitArm64BlockCache::WriteLinkBlock(u8* location, const JitBlock& block)
|
||||
{
|
||||
const u8* address = block.checkedEntry;
|
||||
ARM64XEmitter emit(location);
|
||||
s64 offset = address - location;
|
||||
|
||||
|
|
|
@ -12,6 +12,6 @@ typedef void (*CompiledCode)();
|
|||
class JitArm64BlockCache : public JitBaseBlockCache
|
||||
{
|
||||
private:
|
||||
void WriteLinkBlock(u8* location, const u8* address);
|
||||
void WriteLinkBlock(u8* location, const JitBlock& block);
|
||||
void WriteDestroyBlock(const u8* location, u32 address);
|
||||
};
|
||||
|
|
|
@ -198,7 +198,7 @@ using namespace Gen;
|
|||
int destinationBlock = GetBlockNumberFromStartAddress(e.exitAddress);
|
||||
if (destinationBlock != -1)
|
||||
{
|
||||
WriteLinkBlock(e.exitPtrs, blocks[destinationBlock].checkedEntry);
|
||||
WriteLinkBlock(e.exitPtrs, blocks[destinationBlock]);
|
||||
e.linkStatus = true;
|
||||
}
|
||||
}
|
||||
|
@ -316,8 +316,9 @@ using namespace Gen;
|
|||
}
|
||||
}
|
||||
|
||||
void JitBlockCache::WriteLinkBlock(u8* location, const u8* address)
|
||||
void JitBlockCache::WriteLinkBlock(u8* location, const JitBlock& block)
|
||||
{
|
||||
const u8* address = block.checkedEntry;
|
||||
XEmitter emit(location);
|
||||
if (*location == 0xE8)
|
||||
{
|
||||
|
|
|
@ -116,7 +116,7 @@ class JitBaseBlockCache
|
|||
void DestroyBlock(int block_num, bool invalidate);
|
||||
|
||||
// Virtual for overloaded
|
||||
virtual void WriteLinkBlock(u8* location, const u8* address) = 0;
|
||||
virtual void WriteLinkBlock(u8* location, const JitBlock& block) = 0;
|
||||
virtual void WriteDestroyBlock(const u8* location, u32 address) = 0;
|
||||
|
||||
public:
|
||||
|
@ -164,6 +164,6 @@ public:
|
|||
class JitBlockCache : public JitBaseBlockCache
|
||||
{
|
||||
private:
|
||||
void WriteLinkBlock(u8* location, const u8* address) override;
|
||||
void WriteLinkBlock(u8* location, const JitBlock& block) override;
|
||||
void WriteDestroyBlock(const u8* location, u32 address) override;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue