From 093979a65a6b143296643b8c3dd47ccfd737ea70 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 7 Aug 2022 01:27:34 +1000 Subject: [PATCH] Build: Disable mmap fastmem for Apple Silicon It uses 16K pages, which means we'd also have to protect at 16K granularity... which might be okay, but there's probably going to be more faults due to code/data in the same page, which negates much of the benefit. --- src/core/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 40cc3596c..dfa7bbf06 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -163,7 +163,11 @@ elseif(${CPU_ARCH} STREQUAL "aarch32") target_link_libraries(core PUBLIC vixl) message("Building AArch32 recompiler") elseif(${CPU_ARCH} STREQUAL "aarch64") - target_compile_definitions(core PUBLIC "WITH_RECOMPILER=1" "WITH_MMAP_FASTMEM=1") + target_compile_definitions(core PUBLIC "WITH_RECOMPILER=1") + if (NOT APPLE) + # Disabled until we support 16K pages. + target_compile_definitions(core PUBLIC "WITH_MMAP_FASTMEM=1") + endif() target_sources(core PRIVATE ${RECOMPILER_SRCS} cpu_recompiler_code_generator_aarch64.cpp )