From a9534a7cf3059bb266ac57eea59a8894b7b83535 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 18 Aug 2017 02:11:41 -0400 Subject: Use CRYPTOPP_SSE2_INTRIN_AVAILABLE for consistent naming --- gcm.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gcm.cpp') diff --git a/gcm.cpp b/gcm.cpp index 033e8da9..d9c77df8 100644 --- a/gcm.cpp +++ b/gcm.cpp @@ -32,7 +32,7 @@ NAMESPACE_BEGIN(CryptoPP) -#if (CRYPTOPP_SSE2_AVAILABLE) +#if (CRYPTOPP_SSE2_INTRIN_AVAILABLE) # include "emmintrin.h" #endif @@ -76,14 +76,14 @@ inline static void Xor16(byte *a, const byte *b, const byte *c) ((word64 *)(void *)a)[1] = ((word64 *)(void *)b)[1] ^ ((word64 *)(void *)c)[1]; } -#if CRYPTOPP_SSE2_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE +#if CRYPTOPP_SSE2_INTRIN_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE inline static void GCM_Xor16_SSE2(byte *a, const byte *b, const byte *c) { // SunCC 5.14 crash (bewildering since asserts are not in effect in release builds) // Also see http://github.com/weidai11/cryptopp/issues/226 and http://github.com/weidai11/cryptopp/issues/284 # if __SUNPRO_CC *M128_CAST(a) = _mm_xor_si128(*M128_CAST(b), *M128_CAST(c)); -# elif CRYPTOPP_SSE2_AVAILABLE +# elif CRYPTOPP_SSE2_INTRIN_AVAILABLE CRYPTOPP_ASSERT(IsAlignedOn(a,GetAlignmentOf<__m128i>())); CRYPTOPP_ASSERT(IsAlignedOn(b,GetAlignmentOf<__m128i>())); CRYPTOPP_ASSERT(IsAlignedOn(c,GetAlignmentOf<__m128i>())); @@ -197,7 +197,7 @@ void GCM_Base::SetKeyWithoutResync(const byte *userKey, size_t keylength, const for (i=0; i<16; i++) { memset(mulTable+i*256*16, 0, 16); -#if CRYPTOPP_SSE2_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE +#if CRYPTOPP_SSE2_INTRIN_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE if (HasSSE2()) for (j=2; j<=0x80; j*=2) for (k=1; k