summaryrefslogtreecommitdiff
path: root/chacha_simd.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-04-05 17:23:32 -0400
committerJeffrey Walton <noloader@gmail.com>2020-04-05 17:23:32 -0400
commitd53f064c9b5a205b685c707570e6b1c2057a52e8 (patch)
tree57b574383a159182817765981a3eefdedf1c493e /chacha_simd.cpp
parentb117ba327829c952165bbc820f987a7337c51e39 (diff)
downloadcryptopp-git-d53f064c9b5a205b685c707570e6b1c2057a52e8.tar.gz
Use Altivec as minimum ISA of ChaCha Simon64 and Speck64
Diffstat (limited to 'chacha_simd.cpp')
-rw-r--r--chacha_simd.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/chacha_simd.cpp b/chacha_simd.cpp
index 6f15473c..4e5a3cc3 100644
--- a/chacha_simd.cpp
+++ b/chacha_simd.cpp
@@ -211,7 +211,7 @@ inline __m128i RotateLeft<16>(const __m128i val)
#if (CRYPTOPP_ALTIVEC_AVAILABLE)
-// ChaCha_OperateKeystream_POWER7 is optimized for POWER7. However, Altivec
+// ChaCha_OperateKeystream is optimized for Altivec. However, Altivec
// is supported by using vec_ld and vec_st, and using a composite VecAdd
// that supports 64-bit element adds. vec_ld and vec_st add significant
// overhead when memory is not aligned. Despite the drawbacks Altivec
@@ -826,7 +826,7 @@ void ChaCha_OperateKeystream_SSE2(const word32 *state, const byte* input, byte *
#endif // CRYPTOPP_SSE2_INTRIN_AVAILABLE
-#if (CRYPTOPP_POWER7_AVAILABLE || CRYPTOPP_ALTIVEC_AVAILABLE)
+#if (CRYPTOPP_ALTIVEC_AVAILABLE)
// ChaCha_OperateKeystream_CORE will use either POWER7 or ALTIVEC,
// depending on the flags used to compile this source file. The
@@ -1095,16 +1095,9 @@ inline void ChaCha_OperateKeystream_CORE(const word32 *state, const byte* input,
VecStore32LE(output + 15*16, r3_3);
}
-#endif // CRYPTOPP_POWER7_AVAILABLE || CRYPTOPP_ALTIVEC_AVAILABLE
-
-#if (CRYPTOPP_POWER7_AVAILABLE)
-
-void ChaCha_OperateKeystream_POWER7(const word32 *state, const byte* input, byte *output, unsigned int rounds)
-{
- ChaCha_OperateKeystream_CORE(state, input, output, rounds);
-}
+#endif // CRYPTOPP_ALTIVEC_AVAILABLE
-#elif (CRYPTOPP_ALTIVEC_AVAILABLE)
+#if (CRYPTOPP_ALTIVEC_AVAILABLE)
void ChaCha_OperateKeystream_ALTIVEC(const word32 *state, const byte* input, byte *output, unsigned int rounds)
{