From 71ebc49b59d3b85ed9b8dc81d40e13a05a4f805f Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Tue, 30 Mar 2021 21:06:52 +0200 Subject: Improve indirect jumps in ARM Handle already translated blocks in the ARM asm to speed up indirect branches (affect some games more than others) --- cpu_threaded.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpu_threaded.c') 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 "" -- cgit v1.2.3