CPU/CodeCache: Fix rewinding on Apple Silicon

This commit is contained in:
Stenzek 2023-12-18 21:01:38 +10:00
parent 7829abc014
commit 6a7dea6908
No known key found for this signature in database
1 changed files with 2 additions and 0 deletions

View File

@ -684,6 +684,7 @@ void CPU::CodeCache::InvalidateBlock(Block* block, BlockState new_state)
void CPU::CodeCache::InvalidateAllRAMBlocks()
{
// TODO: maybe combine the backlink into one big instruction flush cache?
MemMap::BeginCodeWrite();
for (Block* block : s_blocks)
{
@ -691,6 +692,7 @@ void CPU::CodeCache::InvalidateAllRAMBlocks()
InvalidateBlock(block, BlockState::Invalidated);
}
MemMap::EndCodeWrite();
Bus::ClearRAMCodePageFlags();
}