mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 06:00:41 +02:00
Core: Clear relocations after the cache service had a chance to copy them
Can't clear the relocations vector until after the code object cache service has consumed them.
This commit is contained in:
1 parent
afe10c1666
commit
b3cd4edb3b
6 files changed
+12
-2
No files matched your search
@@ -1017,6 +1017,9 @@ namespace FEXCore::Context {
|
||||
));
|
||||
}
|
||||
|
||||
// Clear any relocations that might have been generated
|
||||
Thread->CPUBackend->ClearRelocations();
|
||||
|
||||
if (IRCaptureCache.PostCompileCode(
|
||||
Thread,
|
||||
CodePtr,
|
||||
|
||||
@@ -832,7 +832,6 @@ void *Arm64JITCore::CompileCode(uint64_t Entry, [[maybe_unused]] FEXCore::IR::IR
|
||||
DebugData->HostCodeSize = reinterpret_cast<uintptr_t>(CodeEnd) - reinterpret_cast<uintptr_t>(GuestEntry);
|
||||
DebugData->Relocations = &Relocations;
|
||||
}
|
||||
Relocations.clear();
|
||||
|
||||
this->IR = nullptr;
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ public:
|
||||
|
||||
static void InitializeSignalHandlers(FEXCore::Context::Context *CTX);
|
||||
|
||||
void ClearRelocations() override { Relocations.clear(); }
|
||||
|
||||
private:
|
||||
FEX_CONFIG_OPT(ParanoidTSO, PARANOIDTSO);
|
||||
|
||||
|
||||
@@ -804,7 +804,6 @@ void *X86JITCore::CompileCode(uint64_t Entry, [[maybe_unused]] FEXCore::IR::IRLi
|
||||
DebugData->HostCodeSize = reinterpret_cast<uintptr_t>(GuestExit) - reinterpret_cast<uintptr_t>(GuestEntry);
|
||||
DebugData->Relocations = &Relocations;
|
||||
}
|
||||
Relocations.clear();
|
||||
|
||||
return GuestEntry;
|
||||
}
|
||||
|
||||
@@ -84,6 +84,8 @@ public:
|
||||
|
||||
static void InitializeSignalHandlers(FEXCore::Context::Context *CTX);
|
||||
|
||||
void ClearRelocations() override { Relocations.clear(); }
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
||||
@@ -112,6 +112,11 @@ class LLVMCore;
|
||||
*/
|
||||
virtual bool NeedsRetainedIRCopy() const { return false; }
|
||||
|
||||
/**
|
||||
* @brief Clear any relocations after JIT compiling
|
||||
*/
|
||||
virtual void ClearRelocations() {}
|
||||
|
||||
using AsmDispatch = FEX_NAKED void(*)(FEXCore::Core::CpuStateFrame *Frame);
|
||||
using JITCallback = FEX_NAKED void(*)(FEXCore::Core::CpuStateFrame *Frame, uint64_t RIP);
|
||||
|
||||
|
||||
Reference in new issue
Block a user