From 6a7dea6908a96f56fee460edc9426212a6b22a50 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 18 Dec 2023 21:01:38 +1000 Subject: [PATCH] CPU/CodeCache: Fix rewinding on Apple Silicon --- src/core/cpu_code_cache.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/cpu_code_cache.cpp b/src/core/cpu_code_cache.cpp index 285e40eb5..d29a364c4 100644 --- a/src/core/cpu_code_cache.cpp +++ b/src/core/cpu_code_cache.cpp @@ -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(); }