From 0793f98c87b984602cef20b799e36e2b7a37b45f Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 22 Nov 2020 13:59:26 +1000 Subject: [PATCH] CPU/Recompiler: Reduce armv7 code buffer size --- src/core/cpu_code_cache.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/cpu_code_cache.cpp b/src/core/cpu_code_cache.cpp index 6ee124125..6db67a18c 100644 --- a/src/core/cpu_code_cache.cpp +++ b/src/core/cpu_code_cache.cpp @@ -25,8 +25,14 @@ constexpr bool USE_BLOCK_LINKING = true; #define USE_STATIC_CODE_BUFFER 1 #endif +#if defined(AARCH32) +// Use a smaller code buffer size on AArch32 to have a better chance of being in range. +static constexpr u32 RECOMPILER_CODE_CACHE_SIZE = 16 * 1024 * 1024; +static constexpr u32 RECOMPILER_FAR_CODE_CACHE_SIZE = 8 * 1024 * 1024; +#else static constexpr u32 RECOMPILER_CODE_CACHE_SIZE = 32 * 1024 * 1024; -static constexpr u32 RECOMPILER_FAR_CODE_CACHE_SIZE = 32 * 1024 * 1024; +static constexpr u32 RECOMPILER_FAR_CODE_CACHE_SIZE = 16 * 1024 * 1024; +#endif static constexpr u32 CODE_WRITE_FAULT_THRESHOLD_FOR_SLOWMEM = 10; #ifdef USE_STATIC_CODE_BUFFER