diff options
author | Hans Kristian Rosbach <hk-git@circlestorm.org> | 2019-09-20 22:50:50 +0200 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2019-09-21 22:10:46 +0200 |
commit | e0480bc800f2f8c452b3a7c33434010d94b76446 (patch) | |
tree | 7fa1e137d5d5ffe741f9e298983f3f055c3c4917 /functable.c | |
parent | 9f16eae381726c721890ea7212445d5b6a7bd3c4 (diff) |
Unify detection of ARM getauxval code availability.
We don't want to compile arch-specific code when WITH_OPTIM is not set,
and the current checks don't take that into account.
Diffstat (limited to 'functable.c')
-rw-r--r-- | functable.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/functable.c b/functable.c index 8ae6960..fcdd34c 100644 --- a/functable.c +++ b/functable.c @@ -17,9 +17,9 @@ extern Pos insert_string_acle(deflate_state *const s, const Pos str, unsigned in #endif /* fill_window */ -#ifdef X86_SSE2 +#if defined(X86_SSE2) extern void fill_window_sse(deflate_state *s); -#elif defined(__arm__) || defined(__aarch64__) || defined(_M_ARM) || defined(_M_ARM64) +#elif defined(ARM_GETAUXVAL) extern void fill_window_arm(deflate_state *s); #endif @@ -90,12 +90,12 @@ ZLIB_INTERNAL void fill_window_stub(deflate_state *s) { // Initialize default functable.fill_window=&fill_window_c; - #ifdef X86_SSE2 + #if defined(X86_SSE2) # if !defined(__x86_64__) && !defined(_M_X64) && !defined(X86_NOCHECK_SSE2) if (x86_cpu_has_sse2) # endif functable.fill_window=&fill_window_sse; - #elif defined(__arm__) || defined(__aarch64__) || defined(_M_ARM) || defined(_M_ARM64) + #elif defined(ARM_GETAUXVAL) functable.fill_window=&fill_window_arm; #endif |