From 06867e5caf839e8a178db324e58677706027b6a5 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 3 Nov 2018 05:50:34 -0400 Subject: Guard BLAKE2 on CRYPTOPP_ALTIVEC_AVAILABLE --- blake2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'blake2.cpp') diff --git a/blake2.cpp b/blake2.cpp index df2a709e..c696169e 100644 --- a/blake2.cpp +++ b/blake2.cpp @@ -14,7 +14,7 @@ // Do so in both blake2.cpp and blake2-simd.cpp. // #undef CRYPTOPP_SSE41_AVAILABLE // #undef CRYPTOPP_ARM_NEON_AVAILABLE -// #undef CRYPTOPP_POWER8_AVAILABLE +// #undef CRYPTOPP_ALTIVEC_AVAILABLE // Disable NEON/ASIMD for Cortex-A53 and A57. The shifts are too slow and C/C++ is about // 3 cpb faster than NEON/ASIMD. Also see http://github.com/weidai11/cryptopp/issues/367. @@ -22,9 +22,9 @@ # undef CRYPTOPP_ARM_NEON_AVAILABLE #endif -// Disable POWER7 on PowerPC big-endian machines. Blake2s/POWER7 runs slower than C++. -#if defined(__powerpc__) && defined(__BIG_ENDIAN__) +#if !(CRYPTOPP_ALTIVEC_AVAILABLE) # undef CRYPTOPP_POWER7_AVAILABLE +# undef CRYPTOPP_POWER8_AVAILABLE #endif ANONYMOUS_NAMESPACE_BEGIN -- cgit v1.2.1