diff --git a/Source/Core/Core/GeckoCode.cpp b/Source/Core/Core/GeckoCode.cpp index d4c76df23e..92f389545d 100644 --- a/Source/Core/Core/GeckoCode.cpp +++ b/Source/Core/Core/GeckoCode.cpp @@ -17,6 +17,7 @@ #include "Core/Config/MainSettings.h" #include "Core/Core.h" +#include "Core/Host.h" #include "Core/PowerPC/MMU.h" #include "Core/PowerPC/PowerPC.h" #include "Core/System.h" @@ -196,6 +197,7 @@ static Installation InstallCodeHandlerLocked(const Core::CPUThreadGuard& guard) { ppc_state.iCache.Invalidate(memory, jit_interface, INSTALLER_BASE_ADDRESS + j); } + Host_JitCacheInvalidation(); return Installation::Installed; } diff --git a/Source/Core/Core/HLE/HLE.cpp b/Source/Core/Core/HLE/HLE.cpp index 0fafedfaa8..66d0960821 100644 --- a/Source/Core/Core/HLE/HLE.cpp +++ b/Source/Core/Core/HLE/HLE.cpp @@ -16,6 +16,7 @@ #include "Core/HLE/HLE_Misc.h" #include "Core/HLE/HLE_OS.h" #include "Core/HW/Memmap.h" +#include "Core/Host.h" #include "Core/IOS/ES/ES.h" #include "Core/PowerPC/PPCSymbolDB.h" #include "Core/PowerPC/PowerPC.h" @@ -74,6 +75,7 @@ void Patch(Core::System& system, u32 addr, std::string_view func_name) { s_hooked_addresses[addr] = i; ppc_state.iCache.Invalidate(memory, jit_interface, addr); + Host_JitCacheInvalidation(); return; } } @@ -144,6 +146,8 @@ void PatchFunctions(Core::System& system) INFO_LOG_FMT(OSHLE, "Patching {} {:08x}", os_patches[i].name, symbol->address); } } + + Host_JitCacheInvalidation(); } void Clear() @@ -264,6 +268,7 @@ u32 UnPatch(Core::System& system, std::string_view patch_name) ++i; } } + Host_JitCacheInvalidation(); return addr; } @@ -276,6 +281,7 @@ u32 UnPatch(Core::System& system, std::string_view patch_name) s_hooked_addresses.erase(addr); ppc_state.iCache.Invalidate(memory, jit_interface, addr); } + Host_JitCacheInvalidation(); return symbol->address; } @@ -299,6 +305,7 @@ u32 UnpatchRange(Core::System& system, u32 start_addr, u32 end_addr) i = s_hooked_addresses.erase(i); count += 1; } + Host_JitCacheInvalidation(); return count; } diff --git a/Source/Core/Core/PowerPC/PowerPC.cpp b/Source/Core/Core/PowerPC/PowerPC.cpp index fec63c86d5..3cc1112bd7 100644 --- a/Source/Core/Core/PowerPC/PowerPC.cpp +++ b/Source/Core/Core/PowerPC/PowerPC.cpp @@ -57,6 +57,7 @@ static void InvalidateCacheThreadSafe(Core::System& system, u64 userdata, s64 cy { system.GetPPCState().iCache.Invalidate(system.GetMemory(), system.GetJitInterface(), static_cast(userdata)); + Host_JitCacheInvalidation(); } PowerPCManager::PowerPCManager(Core::System& system) @@ -296,6 +297,7 @@ void PowerPCManager::ScheduleInvalidateCacheThreadSafe(u32 address) { m_ppc_state.iCache.Invalidate(m_system.GetMemory(), m_system.GetJitInterface(), static_cast(address)); + Host_JitCacheInvalidation(); } }