summaryrefslogtreecommitdiff
path: root/blake2.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-11-03 05:50:34 -0400
committerJeffrey Walton <noloader@gmail.com>2018-11-03 05:50:34 -0400
commit06867e5caf839e8a178db324e58677706027b6a5 (patch)
treeba207acef4780d2996f90de7824ce3cccf022c1f /blake2.cpp
parentdfacc9f15c8c8ecf5db3b23a3f1113894daf8704 (diff)
downloadcryptopp-git-06867e5caf839e8a178db324e58677706027b6a5.tar.gz
Guard BLAKE2 on CRYPTOPP_ALTIVEC_AVAILABLE
Diffstat (limited to 'blake2.cpp')
-rw-r--r--blake2.cpp6
1 files changed, 3 insertions, 3 deletions
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