Skip to content

Commit

Permalink
CPU/CodeCache: Fix rewinding on Apple Silicon
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Dec 18, 2023
1 parent 7829abc commit 6a7dea6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/cpu_code_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,13 +684,15 @@ 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)
{
if (AddressInRAM(block->pc))
InvalidateBlock(block, BlockState::Invalidated);
}

MemMap::EndCodeWrite();
Bus::ClearRAMCodePageFlags();
}

Expand Down

0 comments on commit 6a7dea6

Please sign in to comment.