summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blake2.cpp29
-rw-r--r--blake2s_simd.cpp26
2 files changed, 12 insertions, 43 deletions
diff --git a/blake2.cpp b/blake2.cpp
index c0664ad8..a0ae8238 100644
--- a/blake2.cpp
+++ b/blake2.cpp
@@ -4,9 +4,9 @@
// implementation at http://github.com/BLAKE2/BLAKE2.
//
// The BLAKE2b and BLAKE2s numbers are consistent with the BLAKE2 team's
-// numbers. However, we have an Altivec/POWER7 implementation of BLAKE2s,
+// numbers. However, we have an Altivec implementation of BLAKE2s,
// and a POWER8 implementation of BLAKE2b (BLAKE2 team is missing them).
-// Altivec/POWER7 code is about 2x faster than C++ when using GCC 5.0 or
+// Altivec code is about 2x faster than C++ when using GCC 5.0 or
// above. The POWER8 code is about 2.5x faster than C++ when using GCC 5.0
// or above. If you use GCC 4.0 (PowerMac) or GCC 4.8 (GCC Compile Farm)
// then the PowerPC code will be slower than C++. Be sure to use GCC 5.0
@@ -181,12 +181,6 @@ extern void BLAKE2_Compress32_NEON(const byte* input, BLAKE2s_State& state);
extern void BLAKE2_Compress64_NEON(const byte* input, BLAKE2b_State& state);
#endif
-#if CRYPTOPP_POWER7_AVAILABLE
-extern void BLAKE2_Compress32_POWER7(const byte* input, BLAKE2s_State& state);
-#elif CRYPTOPP_ALTIVEC_AVAILABLE
-extern void BLAKE2_Compress32_ALTIVEC(const byte* input, BLAKE2s_State& state);
-#endif
-
#if CRYPTOPP_POWER8_AVAILABLE
extern void BLAKE2_Compress64_POWER8(const byte* input, BLAKE2b_State& state);
#endif
@@ -243,11 +237,7 @@ unsigned int BLAKE2s::OptimalDataAlignment() const
return 4;
else
#endif
-#if (CRYPTOPP_POWER7_AVAILABLE)
- if (HasPower7())
- return 4;
- else
-#elif (CRYPTOPP_ALTIVEC_AVAILABLE)
+#if (CRYPTOPP_ALTIVEC_AVAILABLE)
if (HasAltivec())
return 16;
else
@@ -267,11 +257,7 @@ std::string BLAKE2s::AlgorithmProvider() const
return "NEON";
else
#endif
-#if (CRYPTOPP_POWER7_AVAILABLE)
- if (HasPower7())
- return "Power7";
- else
-#elif (CRYPTOPP_ALTIVEC_AVAILABLE)
+#if (CRYPTOPP_ALTIVEC_AVAILABLE)
if (HasAltivec())
return "Altivec";
else
@@ -696,12 +682,7 @@ void BLAKE2s::Compress(const byte *input)
return BLAKE2_Compress32_NEON(input, m_state);
}
#endif
-#if CRYPTOPP_POWER7_AVAILABLE
- if(HasPower7())
- {
- return BLAKE2_Compress32_POWER7(input, m_state);
- }
-#elif CRYPTOPP_ALTIVEC_AVAILABLE
+#if CRYPTOPP_ALTIVEC_AVAILABLE
if(HasAltivec())
{
return BLAKE2_Compress32_ALTIVEC(input, m_state);
diff --git a/blake2s_simd.cpp b/blake2s_simd.cpp
index bf36165e..a6e7bbb2 100644
--- a/blake2s_simd.cpp
+++ b/blake2s_simd.cpp
@@ -8,10 +8,10 @@
// appropriate instructions sets in some build configurations.
// The BLAKE2b and BLAKE2s numbers are consistent with the BLAKE2 team's
-// numbers. However, we have an Altivec/POWER7 implementation of BLAKE2s,
-// and a POWER7 implementation of BLAKE2b (BLAKE2 is missing them). The
-// Altivec/POWER7 code is about 2x faster than C++ when using GCC 5.0 or
-// above. The POWER7 code is about 2.5x faster than C++ when using GCC 5.0
+// numbers. However, we have an Altivec implementation of BLAKE2s,
+// and a POWER8 implementation of BLAKE2b (BLAKE2 team is missing them).
+// Altivec code is about 2x faster than C++ when using GCC 5.0 or
+// above. The POWER8 code is about 2.5x faster than C++ when using GCC 5.0
// or above. If you use GCC 4.0 (PowerMac) or GCC 4.8 (GCC Compile Farm)
// then the PowerPC code will be slower than C++. Be sure to use GCC 5.0
// 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)
}
#endif // CRYPTOPP_ARM_NEON_AVAILABLE
-#if (CRYPTOPP_POWER7_AVAILABLE || CRYPTOPP_ALTIVEC_AVAILABLE)
+#if (CRYPTOPP_ALTIVEC_AVAILABLE)
inline uint32x4_p VecLoad32(const void* p)
{
@@ -868,11 +868,6 @@ uint32x4_p VectorSet32<3,1,3,1>(const uint32x4_p a, const uint32x4_p b,
return VecPermute(a, c, mask);
}
-// BLAKE2_Compress32_CORE will use either POWER7 or ALTIVEC,
-// depending on the flags used to compile this source file. The
-// abstractions are handled in VecLoad, VecStore and friends. In
-// the future we may provide both POWER7 or ALTIVEC at the same
-// time to better support distros.
void BLAKE2_Compress32_CORE(const byte* input, BLAKE2s_State& state)
{
# define m1 m0
@@ -1020,16 +1015,9 @@ void BLAKE2_Compress32_CORE(const byte* input, BLAKE2s_State& state)
VecStore32LE(state.h()+0, VecXor(ff0, VecXor(row1, row3)));
VecStore32LE(state.h()+4, VecXor(ff1, VecXor(row2, row4)));
}
-#endif // CRYPTOPP_POWER7_AVAILABLE || CRYPTOPP_ALTIVEC_AVAILABLE
-
-#if (CRYPTOPP_POWER7_AVAILABLE)
+#endif // CRYPTOPP_ALTIVEC_AVAILABLE
-void BLAKE2_Compress32_POWER7(const byte* input, BLAKE2s_State& state)
-{
- BLAKE2_Compress32_CORE(input, state);
-}
-
-#elif (CRYPTOPP_ALTIVEC_AVAILABLE)
+#if (CRYPTOPP_ALTIVEC_AVAILABLE)
void BLAKE2_Compress32_ALTIVEC(const byte* input, BLAKE2s_State& state)
{