// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <[email protected]>1// SPDX-License-Identifier: CC-BY-NC-ND-4.023#pragma once45#include "bus.h"6#include "cpu_types.h"78class Error;910namespace CPU::CodeCache {1112/// Returns true if any recompiler is in use.13bool IsUsingRecompiler();1415/// Returns true if any recompiler and fastmem is in use.16bool IsUsingFastmem();1718/// Allocates resources, call once at startup.19bool ProcessStartup(Error* error);2021/// Frees resources, call once at shutdown.22void ProcessShutdown();2324/// Runs the system.25[[noreturn]] void Execute();2627/// Flushes the code cache, forcing all blocks to be recompiled.28void Reset();2930/// Free all non-persistent resources for the code cache.31void Shutdown();3233/// Invalidates all blocks which are in the range of the specified code page.34void InvalidateBlocksWithPageIndex(u32 page_index);3536/// Invalidates all blocks in the cache.37void InvalidateAllRAMBlocks();3839} // namespace CPU::CodeCache404142