From 5ffd2832e8b3fc8391a99a53d24788fb736d28c6 Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Wed, 3 Mar 2021 01:38:09 +0100 Subject: Rewrite of the MIPS dynarec stubs This allows us to emit the handlers directly in a more efficient manner. At the same time it allows for an easy fix to emit PIC code, which is necessary for libretro. This also enables more platform specific optimizations and variations, perhaps even run-time multiplatform support. --- cpu.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'cpu.h') diff --git a/cpu.h b/cpu.h index 0d7553a..66d24d3 100644 --- a/cpu.h +++ b/cpu.h @@ -122,21 +122,19 @@ s32 translate_block_thumb(u32 pc, translation_region_type translation_region, u32 smc_enable); #if defined(PSP) - -#define ROM_TRANSLATION_CACHE_SIZE (1024 * 512 * 4) -#define RAM_TRANSLATION_CACHE_SIZE (1024 * 384) -#define BIOS_TRANSLATION_CACHE_SIZE (1024 * 128) -#define TRANSLATION_CACHE_LIMIT_THRESHOLD (1024) - + #define ROM_TRANSLATION_CACHE_SIZE (1024 * 512 * 4) + #define RAM_TRANSLATION_CACHE_SIZE (1024 * 384) + #define BIOS_TRANSLATION_CACHE_SIZE (1024 * 128) + #define TRANSLATION_CACHE_LIMIT_THRESHOLD (1024) #else - -#define ROM_TRANSLATION_CACHE_SIZE (1024 * 512 * 4 * 5) -#define RAM_TRANSLATION_CACHE_SIZE (1024 * 384 * 2) -#define BIOS_TRANSLATION_CACHE_SIZE (1024 * 128 * 2) -#define TRANSLATION_CACHE_LIMIT_THRESHOLD (1024 * 32) - + #define ROM_TRANSLATION_CACHE_SIZE (1024 * 512 * 4 * 5) + #define RAM_TRANSLATION_CACHE_SIZE (1024 * 384 * 2) + #define BIOS_TRANSLATION_CACHE_SIZE (1024 * 128 * 2) + #define TRANSLATION_CACHE_LIMIT_THRESHOLD (1024 * 32) #endif +#define STUB_ARENA_SIZE (4*1024) + #if defined(HAVE_MMAP) extern u8* rom_translation_cache; extern u8* ram_translation_cache; @@ -157,6 +155,7 @@ extern int sceBlock; extern u8 rom_translation_cache[ROM_TRANSLATION_CACHE_SIZE]; extern u8 ram_translation_cache[RAM_TRANSLATION_CACHE_SIZE]; extern u8 bios_translation_cache[BIOS_TRANSLATION_CACHE_SIZE]; +extern u32 stub_arena[STUB_ARENA_SIZE]; #endif extern u8 *rom_translation_ptr; extern u8 *ram_translation_ptr; -- cgit v1.2.3