From eab44b9e0b9dcb5cf7fa7b6851fa5454041da930 Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Wed, 17 Mar 2021 21:05:49 +0100 Subject: Enable runtime dynarec enable/disable Added a more thorough cache cleanup for reset/mode-change too. Fixed the mmap initialization that ends up leaking memory. Minor x86 asm fixes for Android. --- cpu_threaded.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cpu_threaded.c') diff --git a/cpu_threaded.c b/cpu_threaded.c index c66fa5e..519d7f0 100644 --- a/cpu_threaded.c +++ b/cpu_threaded.c @@ -3686,6 +3686,17 @@ void flush_translation_cache_rom(void) memset(rom_branch_hash, 0, sizeof(rom_branch_hash)); } +void wipe_caches(void) +{ + /* Ensure we wipe everything including the SMC mirrors */ + flush_translation_cache_rom(); + ewram_code_min = 0; + ewram_code_max = 0x3FFFF; + iwram_code_min = 0; + iwram_code_max = 0x7FFF; + flush_translation_cache_ram(); +} + #define cache_dump_prefix "" void dump_translation_cache(void) -- cgit v1.2.3