From b1da3dc823232461aaf5562ab6cbb56a2fc6f1d6 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 5 Apr 2020 08:40:49 -0400 Subject: Use Altivec for Simon64 --- simon.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'simon.cpp') diff --git a/simon.cpp b/simon.cpp index e27bf1be..3d951f97 100644 --- a/simon.cpp +++ b/simon.cpp @@ -228,13 +228,7 @@ extern size_t SIMON128_Dec_AdvancedProcessBlocks_SSSE3(const word64* subKeys, si const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags); #endif -#if (CRYPTOPP_POWER7_AVAILABLE) -extern size_t SIMON64_Enc_AdvancedProcessBlocks_POWER7(const word32* subKeys, size_t rounds, - const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags); - -extern size_t SIMON64_Dec_AdvancedProcessBlocks_POWER7(const word32* subKeys, size_t rounds, - const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags); -#elif (CRYPTOPP_ALTIVEC_AVAILABLE) +#if (CRYPTOPP_ALTIVEC_AVAILABLE) extern size_t SIMON64_Enc_AdvancedProcessBlocks_ALTIVEC(const word32* subKeys, size_t rounds, const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags); @@ -537,11 +531,7 @@ size_t SIMON64::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xor return SIMON64_Enc_AdvancedProcessBlocks_NEON(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); #endif -#if (CRYPTOPP_POWER7_AVAILABLE) - if (HasPower7()) - return SIMON64_Enc_AdvancedProcessBlocks_POWER7(m_rkeys, (size_t)m_rounds, - inBlocks, xorBlocks, outBlocks, length, flags); -#elif (CRYPTOPP_ALTIVEC_AVAILABLE) +#if (CRYPTOPP_ALTIVEC_AVAILABLE) if (HasAltivec()) return SIMON64_Enc_AdvancedProcessBlocks_ALTIVEC(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); @@ -562,11 +552,7 @@ size_t SIMON64::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xor return SIMON64_Dec_AdvancedProcessBlocks_NEON(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); #endif -#if (CRYPTOPP_POWER7_AVAILABLE) - if (HasPower7()) - return SIMON64_Dec_AdvancedProcessBlocks_POWER7(m_rkeys, (size_t)m_rounds, - inBlocks, xorBlocks, outBlocks, length, flags); -#elif (CRYPTOPP_ALTIVEC_AVAILABLE) +#if (CRYPTOPP_ALTIVEC_AVAILABLE) if (HasAltivec()) return SIMON64_Dec_AdvancedProcessBlocks_ALTIVEC(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); -- cgit v1.2.1