|
8 | 8 | // appropriate instructions sets in some build configurations.
|
9 | 9 |
|
10 | 10 | // The BLAKE2b and BLAKE2s numbers are consistent with the BLAKE2 team's
|
11 |
| -// numbers. However, we have an Altivec/POWER7 implementation of BLAKE2s, |
12 |
| -// and a POWER7 implementation of BLAKE2b (BLAKE2 is missing them). The |
13 |
| -// Altivec/POWER7 code is about 2x faster than C++ when using GCC 5.0 or |
14 |
| -// above. The POWER7 code is about 2.5x faster than C++ when using GCC 5.0 |
| 11 | +// numbers. However, we have an Altivec implementation of BLAKE2s, |
| 12 | +// and a POWER8 implementation of BLAKE2b (BLAKE2 team is missing them). |
| 13 | +// Altivec code is about 2x faster than C++ when using GCC 5.0 or |
| 14 | +// above. The POWER8 code is about 2.5x faster than C++ when using GCC 5.0 |
15 | 15 | // or above. If you use GCC 4.0 (PowerMac) or GCC 4.8 (GCC Compile Farm)
|
16 | 16 | // then the PowerPC code will be slower than C++. Be sure to use GCC 5.0
|
17 | 17 | // or above for PowerPC builds or disable Altivec for BLAKE2b and BLAKE2s
|
@@ -697,7 +697,7 @@ void BLAKE2_Compress32_NEON(const byte* input, BLAKE2s_State& state)
|
697 | 697 | }
|
698 | 698 | #endif // CRYPTOPP_ARM_NEON_AVAILABLE
|
699 | 699 |
|
700 |
| -#if (CRYPTOPP_POWER7_AVAILABLE || CRYPTOPP_ALTIVEC_AVAILABLE) |
| 700 | +#if (CRYPTOPP_ALTIVEC_AVAILABLE) |
701 | 701 |
|
702 | 702 | inline uint32x4_p VecLoad32(const void* p)
|
703 | 703 | {
|
@@ -868,11 +868,6 @@ uint32x4_p VectorSet32<3,1,3,1>(const uint32x4_p a, const uint32x4_p b,
|
868 | 868 | return VecPermute(a, c, mask);
|
869 | 869 | }
|
870 | 870 |
|
871 |
| -// BLAKE2_Compress32_CORE will use either POWER7 or ALTIVEC, |
872 |
| -// depending on the flags used to compile this source file. The |
873 |
| -// abstractions are handled in VecLoad, VecStore and friends. In |
874 |
| -// the future we may provide both POWER7 or ALTIVEC at the same |
875 |
| -// time to better support distros. |
876 | 871 | void BLAKE2_Compress32_CORE(const byte* input, BLAKE2s_State& state)
|
877 | 872 | {
|
878 | 873 | # define m1 m0
|
@@ -1020,16 +1015,9 @@ void BLAKE2_Compress32_CORE(const byte* input, BLAKE2s_State& state)
|
1020 | 1015 | VecStore32LE(state.h()+0, VecXor(ff0, VecXor(row1, row3)));
|
1021 | 1016 | VecStore32LE(state.h()+4, VecXor(ff1, VecXor(row2, row4)));
|
1022 | 1017 | }
|
1023 |
| -#endif // CRYPTOPP_POWER7_AVAILABLE || CRYPTOPP_ALTIVEC_AVAILABLE |
1024 |
| - |
1025 |
| -#if (CRYPTOPP_POWER7_AVAILABLE) |
| 1018 | +#endif // CRYPTOPP_ALTIVEC_AVAILABLE |
1026 | 1019 |
|
1027 |
| -void BLAKE2_Compress32_POWER7(const byte* input, BLAKE2s_State& state) |
1028 |
| -{ |
1029 |
| - BLAKE2_Compress32_CORE(input, state); |
1030 |
| -} |
1031 |
| - |
1032 |
| -#elif (CRYPTOPP_ALTIVEC_AVAILABLE) |
| 1020 | +#if (CRYPTOPP_ALTIVEC_AVAILABLE) |
1033 | 1021 |
|
1034 | 1022 | void BLAKE2_Compress32_ALTIVEC(const byte* input, BLAKE2s_State& state)
|
1035 | 1023 | {
|
|
0 commit comments