DolphinQt: Signal `Host::JitCacheInvalidation` in more places

This commit is contained in:
mitaclaw 2024-10-23 19:30:56 -07:00
parent 3d9c728910
commit 5a95951751
3 changed files with 11 additions and 0 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -57,6 +57,7 @@ static void InvalidateCacheThreadSafe(Core::System& system, u64 userdata, s64 cy
{
system.GetPPCState().iCache.Invalidate(system.GetMemory(), system.GetJitInterface(),
static_cast<u32>(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<u32>(address));
Host_JitCacheInvalidation();
}
}