Move location of CRYPTOPP_ARM_ACLE_AVAILABLE test in config.h
This should make it easier to detect when we need to include <arm_acle.h>pull/548/head
parent
5856ab5a7e
commit
65222dfe9e
22
config.h
22
config.h
|
|
@ -562,22 +562,12 @@ NAMESPACE_END
|
||||||
// Requires ARMv7 and ACLE 1.0. Testing shows ARMv7 is really ARMv7a under most toolchains.
|
// Requires ARMv7 and ACLE 1.0. Testing shows ARMv7 is really ARMv7a under most toolchains.
|
||||||
// Android still uses ARMv5 and ARMv6 so we have to be conservative when enabling NEON.
|
// Android still uses ARMv5 and ARMv6 so we have to be conservative when enabling NEON.
|
||||||
#if !defined(CRYPTOPP_ARM_NEON_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM)
|
#if !defined(CRYPTOPP_ARM_NEON_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM)
|
||||||
# if defined(__ARM_NEON__) || defined(__ARM_FEATURE_NEON) || \
|
# if defined(__ARM_NEON) || defined(__ARM_FEATURE_NEON) || defined(__ARM_FEATURE_ASIMD) || \
|
||||||
(__ARM_ARCH >= 7) || (CRYPTOPP_MSC_VERSION >= 1700)
|
(__ARM_ARCH >= 7) || (CRYPTOPP_MSC_VERSION >= 1700)
|
||||||
# define CRYPTOPP_ARM_NEON_AVAILABLE 1
|
# define CRYPTOPP_ARM_NEON_AVAILABLE 1
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Don't include <arm_acle.h> when using Apple Clang. Early Apple compilers
|
|
||||||
// fail to compile with <arm_acle.h> included. Later Apple compilers compile
|
|
||||||
// intrinsics without <arm_acle.h> included. Also avoid it with GCC 4.8,
|
|
||||||
// and avoid it on Android, too.
|
|
||||||
#if !defined(CRYPTOPP_APPLE_CLANG_VERSION) && \
|
|
||||||
(!defined(CRYPTOPP_GCC_VERSION) || (CRYPTOPP_GCC_VERSION >= 40900)) && \
|
|
||||||
!defined(__ANDROID__)
|
|
||||||
# define CRYPTOPP_ARM_ACLE_AVAILABLE 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Requires ARMv8 and ACLE 2.0. GCC requires 4.8 and above.
|
// Requires ARMv8 and ACLE 2.0. GCC requires 4.8 and above.
|
||||||
// LLVM Clang requires 3.5. Apple Clang is unknown at the moment.
|
// LLVM Clang requires 3.5. Apple Clang is unknown at the moment.
|
||||||
// Microsoft plans to support ARM-64, but its not clear how to detect it.
|
// Microsoft plans to support ARM-64, but its not clear how to detect it.
|
||||||
|
|
@ -613,6 +603,16 @@ NAMESPACE_END
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Don't include <arm_acle.h> when using Apple Clang. Early Apple compilers
|
||||||
|
// fail to compile with <arm_acle.h> included. Later Apple compilers compile
|
||||||
|
// intrinsics without <arm_acle.h> included. Also avoid it with GCC 4.8,
|
||||||
|
// and avoid it on Android, too.
|
||||||
|
#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) || defined(CRYPTOPP_ARM_CRC32_AVAILABLE) || \
|
||||||
|
defined(CRYPTOPP_ARM_AES_AVAILABLE) || defined(CRYPTOPP_ARM_PMULL_AVAILABLE) || \
|
||||||
|
defined(CRYPTOPP_ARM_SHA_AVAILABLE)
|
||||||
|
# define CRYPTOPP_ARM_ACLE_AVAILABLE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // ARM32, ARM64
|
#endif // ARM32, ARM64
|
||||||
|
|
||||||
// ***************** AltiVec and Power8 ********************
|
// ***************** AltiVec and Power8 ********************
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue