summaryrefslogtreecommitdiff
path: root/cpu_threaded.c
diff options
context:
space:
mode:
authorDavid Guillen Fandos2021-03-17 21:05:49 +0100
committerDavid Guillen Fandos2021-03-17 21:05:49 +0100
commiteab44b9e0b9dcb5cf7fa7b6851fa5454041da930 (patch)
tree71351b6aa15bf47c525cf11402c4d4b06fa6d2e4 /cpu_threaded.c
parentfb7ca09b019248b9a0aba481ea55386f71053d73 (diff)
downloadpicogpsp-eab44b9e0b9dcb5cf7fa7b6851fa5454041da930.tar.gz
picogpsp-eab44b9e0b9dcb5cf7fa7b6851fa5454041da930.tar.bz2
picogpsp-eab44b9e0b9dcb5cf7fa7b6851fa5454041da930.zip
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.
Diffstat (limited to 'cpu_threaded.c')
-rw-r--r--cpu_threaded.c11
1 files changed, 11 insertions, 0 deletions
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)