mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-15 02:25:46 -04:00
CMake: Detect cache line size dynamically on AArch64 Linux
This commit is contained in:
@ -111,3 +111,6 @@ endif()
|
||||
if(HOST_PAGE_SIZE)
|
||||
target_compile_definitions(common PUBLIC "-DOVERRIDE_HOST_PAGE_SIZE=${HOST_PAGE_SIZE}")
|
||||
endif()
|
||||
if(HOST_CACHE_LINE_SIZE)
|
||||
target_compile_definitions(common PUBLIC "-DOVERRIDE_HOST_CACHE_LINE_SIZE=${HOST_CACHE_LINE_SIZE}")
|
||||
endif()
|
||||
|
@ -192,7 +192,9 @@ static constexpr u32 HOST_PAGE_SHIFT = 12;
|
||||
#endif
|
||||
|
||||
// Host cache line sizes.
|
||||
#if defined(__APPLE__) && defined(__aarch64__)
|
||||
#if defined(OVERRIDE_HOST_CACHE_LINE_SIZE)
|
||||
static constexpr u32 HOST_CACHE_LINE_SIZE = OVERRIDE_HOST_CACHE_LINE_SIZE;
|
||||
#elif defined(__APPLE__) && defined(__aarch64__)
|
||||
static constexpr u32 HOST_CACHE_LINE_SIZE = 128; // Apple Silicon uses 128b cache lines.
|
||||
#else
|
||||
static constexpr u32 HOST_CACHE_LINE_SIZE = 64; // Everything else is 64b.
|
||||
|
Reference in New Issue
Block a user