Fix define/include

pull/461/head
Jeffrey Walton 2017-07-29 01:00:30 -04:00
parent fe9e21ddd7
commit 368f344667
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
3 changed files with 9 additions and 9 deletions

View File

@ -433,7 +433,7 @@ NAMESPACE_END
// ***************** IA32 CPU features ********************
#if defined(CRYPTOPP_BOOL_X86) || defined(CRYPTOPP_BOOL_X32) || defined(CRYPTOPP_BOOL_X64)
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64)
// Apple Clang prior to 5.0 cannot handle SSE2
#if defined(CRYPTOPP_APPLE_CLANG_VERSION) && (CRYPTOPP_APPLE_CLANG_VERSION < 50000)
@ -507,7 +507,7 @@ NAMESPACE_END
// ***************** ARM CPU features ********************
#if defined(CRYPTOPP_BOOL_ARM32) || defined(CRYPTOPP_BOOL_ARM64)
#if (CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64)
// Requires ARMv7 and ACLE 1.0. Testing shows ARMv7 is really ARMv7a under most toolchains.
#if !defined(CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM)

View File

@ -1,20 +1,20 @@
// crc-simd.cpp - written and placed in the public domain by
// Jeffrey Walton, Uri Blumenthal and Marcel Raad.
//
// The source file uses intrinsics to gain access to SSE4.2 and
// This source file uses intrinsics to gain access to SSE4.2 and
// ARMv8a CRC-32 and CRC-32C instructions. A separate source file
// is needed because we need additional CXXFLAGS to enable the
// appropriate instructions sets.
// is needed because additional CXXFLAGS are required to enable
// the appropriate instructions sets in some build configurations.
#include "pch.h"
#include "config.h"
#include "misc.h"
#if defined(CRYPTOPP_SSE42_AVAILABLE)
#if (CRYPTOPP_SSE42_AVAILABLE)
# include "nmmintrin.h"
#endif
#if defined(CRYPTOPP_ARMV8A_CRC32_AVAILABLE) && defined(__GNUC__)
#if (CRYPTOPP_ARMV8A_CRC32_AVAILABLE) && defined(__GNUC__)
# include "arm_neon.h"
# include "arm_acle.h"
#endif
@ -47,7 +47,7 @@ void CRC32C_Update_ARMV8(const byte *s, size_t n, word32& c)
}
#endif
#if CRYPTOPP_SSE42_AVAILABLE
#if (CRYPTOPP_SSE42_AVAILABLE)
void CRC32C_Update_SSE42(const byte *s, size_t n, word32& c)
{
for(; !IsAligned<word32>(s) && n > 0; s++, n--)

View File

@ -296,7 +296,7 @@ CRC32C::CRC32C()
void CRC32C::Update(const byte *s, size_t n)
{
#if CRYPTOPP_SSE42_AVAILABLE
#if (CRYPTOPP_SSE42_AVAILABLE)
if (HasSSE4())
{
CRC32C_Update_SSE42(s, n, m_crc);