diff --git a/neon.cpp b/neon.cpp index 99d87463..15b81a6b 100644 --- a/neon.cpp +++ b/neon.cpp @@ -73,10 +73,10 @@ bool CPU_TryNEON_ARM() } return result; # else -# if defined(__android__) && defined(CRYPTOPP_BOOL_ARM64) +# if defined(__android__) && (CRYPTOPP_BOOL_ARM64) if (android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_ASIMD) return true; -# elif defined(__android__) && defined(CRYPTOPP_BOOL_ARM32) +# elif defined(__android__) && (CRYPTOPP_BOOL_ARM32) if (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) return true; # elif defined(__linux__) && defined(__aarch64__) diff --git a/rijndael-simd.cpp b/rijndael-simd.cpp index e7e48e94..e97becad 100644 --- a/rijndael-simd.cpp +++ b/rijndael-simd.cpp @@ -31,12 +31,12 @@ #endif #if (CRYPTOPP_SSE41_AVAILABLE) -// Hack... Apple conflates SSE4.1 and SSE4.2. Without __SSE4_2__, -// Apple fails the compile with "SSE4.2 instruction set not enabled" -// when "nmmintrin.h" is included. Its non-trivial for us to -// automatically add -msse4.2 for Apple Clang. We also want to -// avoid problems on low-end Atoms which have AES but lack SSE4.2. -# if (CRYPTOPP_APPLE_CLANG_VERSION) +// Hack... Clang conflates SSE4.1 and SSE4.2. Without __SSE4_2__, +// early Apple and LLVM compilers fail with "SSE4.2 instruction +// set not enabled" when "nmmintrin.h" is included. Its non-trivial +// for us to automatically add -msse4.2 for Apple Clang. We also want +// to avoid problems on low-end Atoms which have AES but lack SSE4.2. +# if defined(__clang__) # define __SSE4_2__ 1 # endif # include "nmmintrin.h"