diff options
Diffstat (limited to 'functable.c')
-rw-r--r-- | functable.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/functable.c b/functable.c index 93fbd23..91a2a20 100644 --- a/functable.c +++ b/functable.c @@ -10,14 +10,6 @@ #include "gzendian.h" -#if defined(X86_CPUID) -# include "arch/x86/x86.h" -#elif (defined(__arm__) || defined(__aarch64__) || defined(_M_ARM)) -extern int arm_has_crc32(); -extern int arm_has_neon(); -#endif - - /* insert_string */ #ifdef X86_SSE4_2_CRC_HASH extern Pos insert_string_sse(deflate_state *const s, const Pos str, unsigned int count); @@ -69,7 +61,7 @@ ZLIB_INTERNAL Pos insert_string_stub(deflate_state *const s, const Pos str, unsi if (x86_cpu_has_sse42) functable.insert_string=&insert_string_sse; #elif defined(__ARM_FEATURE_CRC32) && defined(ARM_ACLE_CRC_HASH) - if (arm_has_crc32()) + if (arm_cpu_has_crc32) functable.insert_string=&insert_string_acle; #endif @@ -97,7 +89,7 @@ ZLIB_INTERNAL uint32_t adler32_stub(uint32_t adler, const unsigned char *buf, si functable.adler32=&adler32_c; #if ((defined(__ARM_NEON__) || defined(__ARM_NEON)) && defined(ARM_NEON_ADLER32)) - if (arm_has_neon()) + if (arm_cpu_has_neon) functable.adler32=&adler32_neon; #endif @@ -120,7 +112,7 @@ ZLIB_INTERNAL uint32_t crc32_stub(uint32_t crc, const unsigned char *buf, uint64 #if BYTE_ORDER == LITTLE_ENDIAN functable.crc32=crc32_little; # if __ARM_FEATURE_CRC32 && defined(ARM_ACLE_CRC_HASH) - if (arm_has_crc32()) + if (arm_cpu_has_crc32) functable.crc32=crc32_acle; # endif #elif BYTE_ORDER == BIG_ENDIAN |