diff --git a/config.h b/config.h index bf97edbb..3716c890 100644 --- a/config.h +++ b/config.h @@ -453,33 +453,27 @@ NAMESPACE_END #endif // Requires ARMv7 and ACLE 1.0. Testing shows ARMv7 is really ARMv7a under most toolchains. -#if !defined(CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE) -# if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64) && ((CRYPTOPP_GCC_VERSION >= 40400) || (CRYPTOPP_CLANG_VERSION >= 20800) || (CRYPTOPP_APPLE_CLANG_VERSION >= 60000) || (CRYPTOPP_MSC_VERSION >= 1700)) -# if defined(__ARM_NEON__) || defined(__ARM_NEON) || defined(_M_ARM) -# define CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE 1 -# endif +#if !defined(CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM) +# if defined(__ARM_NEON__) || defined(__ARM_NEON) || defined(_M_ARM) +# define CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE 1 # endif #endif // Requires ARMv8 and ACLE 2.0. // Microsoft plans to support ARM-64, but its not clear how to detect it. // TODO: Add MSC_VER and ARM-64 platform define when available -#if !defined(CRYPTOPP_BOOL_ARM_CRC32_INTRINSICS_AVAILABLE) -# if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64) && ((CRYPTOPP_GCC_VERSION >= 40400) || (CRYPTOPP_CLANG_VERSION >= 20800) || (CRYPTOPP_APPLE_CLANG_VERSION >= 60000) || (CRYPTOPP_MSC_VERSION >= 2000)) -# if defined(__ARM_FEATURE_CRC32) || defined(_M_ARM64) -# define CRYPTOPP_BOOL_ARM_CRC32_INTRINSICS_AVAILABLE 1 -# endif +#if !defined(CRYPTOPP_BOOL_ARM_CRC32_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM) +# if defined(__ARM_FEATURE_CRC32) || defined(_M_ARM64) +# define CRYPTOPP_BOOL_ARM_CRC32_INTRINSICS_AVAILABLE 1 # endif #endif // Requires ARMv8 and ACLE 2.0. // Microsoft plans to support ARM-64, but its not clear how to detect it. // TODO: Add MSC_VER and ARM-64 platform define when available -#if !defined(CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE) -# if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64) && ((CRYPTOPP_GCC_VERSION >= 40400) || (CRYPTOPP_CLANG_VERSION >= 20800) || (CRYPTOPP_APPLE_CLANG_VERSION >= 60000) || (CRYPTOPP_MSC_VERSION >= 2000)) -# if defined(__ARM_FEATURE_CRYPTO) || defined(_M_ARM64) -# define CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE 1 -# endif +#if !defined(CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM) +# if defined(__ARM_FEATURE_CRYPTO) || defined(_M_ARM64) +# define CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE 1 # endif #endif @@ -559,6 +553,8 @@ NAMESPACE_END #define CRYPTOPP_BOOL_ARM32 0 #endif +// Microsoft plans to support ARM-64, but its not clear how to detect it. +// TODO: Add MSC_VER and ARM-64 platform define when available #if defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64) #define CRYPTOPP_BOOL_ARM64 1 #else diff --git a/config.recommend b/config.recommend index a6907bb8..44ff61df 100644 --- a/config.recommend +++ b/config.recommend @@ -453,33 +453,27 @@ NAMESPACE_END #endif // Requires ARMv7 and ACLE 1.0. Testing shows ARMv7 is really ARMv7a under most toolchains. -#if !defined(CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE) -# if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64) && ((CRYPTOPP_GCC_VERSION >= 40400) || (CRYPTOPP_CLANG_VERSION >= 20800) || (CRYPTOPP_APPLE_CLANG_VERSION >= 60000) || (CRYPTOPP_MSC_VERSION >= 1700)) -# if defined(__ARM_NEON__) || defined(__ARM_NEON) || defined(_M_ARM) -# define CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE 1 -# endif +#if !defined(CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM) +# if defined(__ARM_NEON__) || defined(__ARM_NEON) || defined(_M_ARM) +# define CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE 1 # endif #endif // Requires ARMv8 and ACLE 2.0. // Microsoft plans to support ARM-64, but its not clear how to detect it. // TODO: Add MSC_VER and ARM-64 platform define when available -#if !defined(CRYPTOPP_BOOL_ARM_CRC32_INTRINSICS_AVAILABLE) -# if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64) && ((CRYPTOPP_GCC_VERSION >= 40400) || (CRYPTOPP_CLANG_VERSION >= 20800) || (CRYPTOPP_APPLE_CLANG_VERSION >= 60000) || (CRYPTOPP_MSC_VERSION >= 2000)) -# if defined(__ARM_FEATURE_CRC32) || defined(_M_ARM64) -# define CRYPTOPP_BOOL_ARM_CRC32_INTRINSICS_AVAILABLE 1 -# endif +#if !defined(CRYPTOPP_BOOL_ARM_CRC32_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM) +# if defined(__ARM_FEATURE_CRC32) || defined(_M_ARM64) +# define CRYPTOPP_BOOL_ARM_CRC32_INTRINSICS_AVAILABLE 1 # endif #endif // Requires ARMv8 and ACLE 2.0. // Microsoft plans to support ARM-64, but its not clear how to detect it. // TODO: Add MSC_VER and ARM-64 platform define when available -#if !defined(CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE) -# if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64) && ((CRYPTOPP_GCC_VERSION >= 40400) || (CRYPTOPP_CLANG_VERSION >= 20800) || (CRYPTOPP_APPLE_CLANG_VERSION >= 60000) || (CRYPTOPP_MSC_VERSION >= 2000)) -# if defined(__ARM_FEATURE_CRYPTO) || defined(_M_ARM64) -# define CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE 1 -# endif +#if !defined(CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM) +# if defined(__ARM_FEATURE_CRYPTO) || defined(_M_ARM64) +# define CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE 1 # endif #endif