diff --git a/adv-simd.h b/adv-simd.h index 6047f5be..7a560764 100644 --- a/adv-simd.h +++ b/adv-simd.h @@ -67,7 +67,7 @@ ANONYMOUS_NAMESPACE_END // *************************** ARM NEON ************************** // -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) NAMESPACE_BEGIN(CryptoPP) diff --git a/simon-simd.cpp b/simon-simd.cpp index ab908eca..91f10779 100644 --- a/simon-simd.cpp +++ b/simon-simd.cpp @@ -62,7 +62,7 @@ using CryptoPP::vec_swap; // SunCC // *************************** ARM NEON ************************** // -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) template inline T UnpackHigh32(const T& a, const T& b) @@ -304,7 +304,7 @@ inline void SIMON64_Dec_6_Blocks(uint32x4_t &block0, uint32x4_t &block1, #endif // CRYPTOPP_ARM_NEON_AVAILABLE -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) template inline T UnpackHigh64(const T& a, const T& b) diff --git a/simon.cpp b/simon.cpp index 438e9197..82b7ef4f 100644 --- a/simon.cpp +++ b/simon.cpp @@ -193,7 +193,7 @@ ANONYMOUS_NAMESPACE_END NAMESPACE_BEGIN(CryptoPP) -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) extern size_t SIMON64_Enc_AdvancedProcessBlocks_NEON(const word32* subKeys, size_t rounds, const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags); @@ -201,7 +201,7 @@ extern size_t SIMON64_Dec_AdvancedProcessBlocks_NEON(const word32* subKeys, size const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags); #endif -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) extern size_t SIMON128_Enc_AdvancedProcessBlocks_NEON(const word64* subKeys, size_t rounds, const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags); @@ -401,7 +401,7 @@ size_t SIMON64::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xor return SIMON64_Enc_AdvancedProcessBlocks_SSE41(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); #endif -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) if (HasNEON()) return SIMON64_Enc_AdvancedProcessBlocks_NEON(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); @@ -417,7 +417,7 @@ size_t SIMON64::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xor return SIMON64_Dec_AdvancedProcessBlocks_SSE41(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); #endif -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) if (HasNEON()) return SIMON64_Dec_AdvancedProcessBlocks_NEON(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); @@ -435,7 +435,7 @@ size_t SIMON128::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xo return SIMON128_Enc_AdvancedProcessBlocks_SSSE3(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); #endif -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) if (HasNEON()) return SIMON128_Enc_AdvancedProcessBlocks_NEON(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); @@ -451,7 +451,7 @@ size_t SIMON128::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xo return SIMON128_Dec_AdvancedProcessBlocks_SSSE3(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); #endif -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) if (HasNEON()) return SIMON128_Dec_AdvancedProcessBlocks_NEON(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); diff --git a/speck-simd.cpp b/speck-simd.cpp index 58d680dd..3666f240 100644 --- a/speck-simd.cpp +++ b/speck-simd.cpp @@ -59,7 +59,7 @@ using CryptoPP::word64; // *************************** ARM NEON ************************** // -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) template inline T UnpackHigh32(const T& a, const T& b) @@ -275,7 +275,7 @@ inline void SPECK64_Dec_6_Blocks(uint32x4_t &block0, uint32x4_t &block1, #endif // CRYPTOPP_ARM_NEON_AVAILABLE -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) template inline T UnpackHigh64(const T& a, const T& b) @@ -912,7 +912,7 @@ NAMESPACE_BEGIN(CryptoPP) // *************************** ARM NEON **************************** // -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) size_t SPECK64_Enc_AdvancedProcessBlocks_NEON(const word32* subKeys, size_t rounds, const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags) { diff --git a/speck.cpp b/speck.cpp index 9aaff67f..d8dd2d01 100644 --- a/speck.cpp +++ b/speck.cpp @@ -170,7 +170,7 @@ ANONYMOUS_NAMESPACE_END NAMESPACE_BEGIN(CryptoPP) -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) extern size_t SPECK64_Enc_AdvancedProcessBlocks_NEON(const word32* subKeys, size_t rounds, const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags); @@ -376,7 +376,7 @@ size_t SPECK64::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xor return SPECK64_Enc_AdvancedProcessBlocks_SSE41(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); #endif -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) if (HasNEON()) return SPECK64_Enc_AdvancedProcessBlocks_NEON(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); @@ -392,7 +392,7 @@ size_t SPECK64::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xor return SPECK64_Dec_AdvancedProcessBlocks_SSE41(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); #endif -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) if (HasNEON()) return SPECK64_Dec_AdvancedProcessBlocks_NEON(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); @@ -410,7 +410,7 @@ size_t SPECK128::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xo return SPECK128_Enc_AdvancedProcessBlocks_SSSE3(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); #endif -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) if (HasNEON()) return SPECK128_Enc_AdvancedProcessBlocks_NEON(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); @@ -426,7 +426,7 @@ size_t SPECK128::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xo return SPECK128_Dec_AdvancedProcessBlocks_SSSE3(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags); #endif -#if defined(CRYPTOPP_ARM_NEON_AVAILABLE) +#if (CRYPTOPP_ARM_NEON_AVAILABLE) if (HasNEON()) return SPECK128_Dec_AdvancedProcessBlocks_NEON(m_rkeys, (size_t)m_rounds, inBlocks, xorBlocks, outBlocks, length, flags);