From 053eb57395f9a9816a475569404ee218c36dce44 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Fri, 15 Aug 2025 21:54:28 +0300 Subject: [PATCH] arm64 JIT: Fix broken cache invalidation --- src/core/DynaRec_aa64/recompiler.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/DynaRec_aa64/recompiler.h b/src/core/DynaRec_aa64/recompiler.h index b36d3ec76..64c89390f 100644 --- a/src/core/DynaRec_aa64/recompiler.h +++ b/src/core/DynaRec_aa64/recompiler.h @@ -237,6 +237,12 @@ class DynaRecCPU final : public PCSX::R3000Acpu { virtual void Shutdown() final; virtual bool isDynarec() final { return true; } + virtual void invalidateCache() override final { + memset(m_regs.iCacheAddr, 0xff, sizeof(m_regs.iCacheAddr)); + memset(m_regs.iCacheCode, 0xff, sizeof(m_regs.iCacheCode)); + uncompileAll(); // Mark all blocks as uncompiled + } + virtual void SetPGXPMode(uint32_t pgxpMode) final { if (pgxpMode != 0) { throw std::runtime_error("PGXP not supported in x64 JIT");