diff options
author | Jeffrey Walton <noloader@gmail.com> | 2020-04-05 17:23:32 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2020-04-05 17:23:32 -0400 |
commit | d53f064c9b5a205b685c707570e6b1c2057a52e8 (patch) | |
tree | 57b574383a159182817765981a3eefdedf1c493e /chacha_simd.cpp | |
parent | b117ba327829c952165bbc820f987a7337c51e39 (diff) | |
download | cryptopp-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.cpp | 15 |
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)
{
|