diff --git a/CodeEmitter/CodeEmitter/Buffer.h b/CodeEmitter/CodeEmitter/Buffer.h index f42b712bef..ef2d6e2dc2 100644 --- a/CodeEmitter/CodeEmitter/Buffer.h +++ b/CodeEmitter/CodeEmitter/Buffer.h @@ -95,10 +95,6 @@ class Buffer { protected: - void ResetBuffer() { - CurrentOffset = BufferBase; - } - uint8_t* BufferBase; uint8_t* CurrentOffset; uint64_t Size; diff --git a/FEXCore/Source/Interface/Context/Context.h b/FEXCore/Source/Interface/Context/Context.h index 16bb79ef1f..c3074ba251 100644 --- a/FEXCore/Source/Interface/Context/Context.h +++ b/FEXCore/Source/Interface/Context/Context.h @@ -248,8 +248,6 @@ class ContextImpl final : public FEXCore::Context::Context { ~ContextImpl(); static void ThreadRemoveCodeEntry(FEXCore::Core::InternalThreadState* Thread, uint64_t GuestRIP); - static void ThreadAddBlockLink(FEXCore::Core::InternalThreadState* Thread, uint64_t GuestDestination, - FEXCore::Context::ExitFunctionLinkData* HostLink, const BlockDelinkerFunc& delinker); template static uint64_t ThreadExitFunctionLink(FEXCore::Core::CpuStateFrame* Frame, ExitFunctionLinkData* Record) { @@ -360,8 +358,6 @@ class ContextImpl final : public FEXCore::Context::Context { */ void InitializeCompiler(FEXCore::Core::InternalThreadState* Thread); - void AddBlockMapping(FEXCore::Core::InternalThreadState* Thread, uint64_t Address, void* Ptr); - IR::AOTIRCaptureCache IRCaptureCache; fextl::unique_ptr CodeObjectCacheService; diff --git a/FEXCore/Source/Interface/Core/Core.cpp b/FEXCore/Source/Interface/Core/Core.cpp index b09266f32d..ee8d60a7ed 100644 --- a/FEXCore/Source/Interface/Core/Core.cpp +++ b/FEXCore/Source/Interface/Core/Core.cpp @@ -497,10 +497,6 @@ void ContextImpl::LockBeforeFork(FEXCore::Core::InternalThreadState* Thread) { } #endif -void ContextImpl::AddBlockMapping(FEXCore::Core::InternalThreadState* Thread, uint64_t Address, void* Ptr) { - Thread->LookupCache->AddBlockMapping(Address, Ptr); -} - void ContextImpl::ClearCodeCache(FEXCore::Core::InternalThreadState* Thread) { FEXCORE_PROFILE_INSTANT("ClearCodeCache"); @@ -845,7 +841,7 @@ uintptr_t ContextImpl::CompileBlock(FEXCore::Core::CpuStateFrame* Frame, uint64_ // Insert to lookup cache // Pages containing this block are added via AddBlockExecutableRange before each page gets accessed in the frontend - AddBlockMapping(Thread, GuestRIP, CodePtr); + Thread->LookupCache->AddBlockMapping(GuestRIP, CodePtr); return (uintptr_t)CodePtr; } @@ -909,19 +905,10 @@ void ContextImpl::MarkMemoryShared(FEXCore::Core::InternalThreadState* Thread) { } } -void ContextImpl::ThreadAddBlockLink(FEXCore::Core::InternalThreadState* Thread, uint64_t GuestDestination, - FEXCore::Context::ExitFunctionLinkData* HostLink, const FEXCore::Context::BlockDelinkerFunc& delinker) { - auto lk = GuardSignalDeferringSection(static_cast(Thread->CTX)->CodeInvalidationMutex, Thread); - - Thread->LookupCache->AddBlockLink(GuestDestination, HostLink, delinker); -} - void ContextImpl::ThreadRemoveCodeEntry(FEXCore::Core::InternalThreadState* Thread, uint64_t GuestRIP) { LogMan::Throw::AFmt(static_cast(Thread->CTX)->CodeInvalidationMutex.try_lock() == false, "CodeInvalidationMutex needs to " "be unique_locked here"); - std::lock_guard lk(Thread->LookupCache->WriteLock); - Thread->LookupCache->Erase(Thread->CurrentFrame, GuestRIP); }