summaryrefslogtreecommitdiff
path: root/cpu_threaded.c
diff options
context:
space:
mode:
authorDavid Guillen Fandos2021-03-30 21:06:52 +0200
committerDavid Guillen Fandos2021-03-30 21:06:52 +0200
commit71ebc49b59d3b85ed9b8dc81d40e13a05a4f805f (patch)
treeb3feb2dcf190c1ba3f954d026a5e795bedf3d8f2 /cpu_threaded.c
parent336b14a876ceb45fe4d0a70e6df3301d1cdf25ba (diff)
downloadpicogpsp-71ebc49b59d3b85ed9b8dc81d40e13a05a4f805f.tar.gz
picogpsp-71ebc49b59d3b85ed9b8dc81d40e13a05a4f805f.tar.bz2
picogpsp-71ebc49b59d3b85ed9b8dc81d40e13a05a4f805f.zip
Improve indirect jumps in ARM
Handle already translated blocks in the ARM asm to speed up indirect branches (affect some games more than others)
Diffstat (limited to 'cpu_threaded.c')
-rw-r--r--cpu_threaded.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpu_threaded.c b/cpu_threaded.c
index 7f12b4f..e5c027e 100644
--- a/cpu_threaded.c
+++ b/cpu_threaded.c
@@ -3644,7 +3644,7 @@ void flush_translation_cache_rom(void)
memset(rom_branch_hash, 0, sizeof(rom_branch_hash));
}
-void wipe_caches(void)
+void init_caches(void)
{
/* Ensure we wipe everything including the SMC mirrors */
flush_translation_cache_rom();
@@ -3653,6 +3653,8 @@ void wipe_caches(void)
iwram_code_min = 0;
iwram_code_max = 0x7FFF;
flush_translation_cache_ram();
+ /* Ensure 0 and FFFF get zeroed out */
+ memset(ram_block_ptrs, 0, sizeof(ram_block_ptrs));
}
#define cache_dump_prefix ""