mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Jit64: Recompile asm routines on cache clear
This is needed so that the checks added in the previous commit will be reevaluated if the value of m_enable_dcache changes. JitArm64 was already recompiling its asm routines on cache clear by necessity. It doesn't have the same setup as Jit64 where the asm routines are in a separate region, so clearing the JitArm64 cache results in the asm routines being cleared too.
This commit is contained in:
@ -305,6 +305,7 @@ void Jit64::ClearCache()
|
||||
ClearCodeSpace();
|
||||
Clear();
|
||||
RefreshConfig(InitFastmemArena::No);
|
||||
asm_routines.Regenerate();
|
||||
ResetFreeMemoryRanges();
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,15 @@ void Jit64AsmRoutineManager::Init()
|
||||
{
|
||||
m_const_pool.Init(AllocChildCodeSpace(4096), 4096);
|
||||
Generate();
|
||||
WriteProtect();
|
||||
WriteProtect(true);
|
||||
}
|
||||
|
||||
void Jit64AsmRoutineManager::Regenerate()
|
||||
{
|
||||
UnWriteProtect(false);
|
||||
ResetCodePtr();
|
||||
Generate();
|
||||
WriteProtect(true);
|
||||
}
|
||||
|
||||
// PLAN: no more block numbers - crazy opcodes just contain offset within
|
||||
|
@ -35,6 +35,7 @@ public:
|
||||
explicit Jit64AsmRoutineManager(Jit64& jit);
|
||||
|
||||
void Init();
|
||||
void Regenerate();
|
||||
|
||||
void ResetStack(Gen::X64CodeBlock& emitter);
|
||||
|
||||
|
Reference in New Issue
Block a user