diff --git a/blake2.cpp b/blake2.cpp index 2cc68ef2..1fa6ef44 100644 --- a/blake2.cpp +++ b/blake2.cpp @@ -40,12 +40,6 @@ NAMESPACE_BEGIN(CryptoPP) # undef CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE #endif -#if defined(CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE) && ((__SUNPRO_CC >= 0x5130) || defined(__clang__)) -# include // _mm_set_epi64x -# include // _mm_blend_epi16 -# include // _mm_shuffle_epi16 -#endif - // C/C++ implementation static void BLAKE2_CXX_Compress32(const byte* input, BLAKE2_State& state); static void BLAKE2_CXX_Compress64(const byte* input, BLAKE2_State& state); @@ -3994,7 +3988,7 @@ static void BLAKE2_NEON_Compress64(const byte* input, BLAKE2_State uint64x2_t row1l, row1h, row2l, row2h; uint64x2_t row3l, row3h, row4l, row4h; - uint64x2_t b0, b1, t0, t1; + uint64x2_t b0 = {0,0}, b1 = {0,0}, t0, t1; row1l = vld1q_u64((const uint64_t *)&state.h[0]); row1h = vld1q_u64((const uint64_t *)&state.h[2]); diff --git a/crc.cpp b/crc.cpp index f3383f2f..738d1238 100644 --- a/crc.cpp +++ b/crc.cpp @@ -13,11 +13,6 @@ NAMESPACE_BEGIN(CryptoPP) # undef CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE #endif -// SunCC 12.4 and above -#if defined(CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE) && ((__SUNPRO_CC >= 0x5130) || defined(__clang__)) -# include -#endif - /* Table of CRC-32's of all single byte values (made by makecrc.c) */ const word32 CRC32::m_tab[] = { #ifdef IS_LITTLE_ENDIAN diff --git a/rdrand.cpp b/rdrand.cpp index b67f30bb..637f5cab 100644 --- a/rdrand.cpp +++ b/rdrand.cpp @@ -45,22 +45,23 @@ ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// +// In general, the library's ASM code is best on Windows, and Intrinsics is +// the best code under GCC. Clang is missing symbols, so it gets ASM. +// The NASM code is optimized well on Linux, but its not easy to cut-in. #if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64) # ifndef CRYPTOPP_CPUID_AVAILABLE # define CRYPTOPP_CPUID_AVAILABLE # endif #endif -// In general, the library's ASM code is best on Windows, and Intrinsics is -// the best code under GCC. Clang is missing symbols, so it gets ASM. -// The NASM code is optimized well on Linux, but its not easy to cut-in. -#if defined(CRYPTOPP_MSC_VERSION) +#if defined(CRYPTOPP_CPUID_AVAILABLE) +# if defined(CRYPTOPP_MSC_VERSION) # define MASM_RDRAND_ASM_AVAILABLE 1 # define MASM_RDSEED_ASM_AVAILABLE 1 -#elif defined(CRYPTOPP_LLVM_CLANG_VERSION) || defined(CRYPTOPP_APPLE_CLANG_VERSION) +# elif defined(CRYPTOPP_LLVM_CLANG_VERSION) || defined(CRYPTOPP_APPLE_CLANG_VERSION) # define GCC_RDRAND_ASM_AVAILABLE 1 # define GCC_RDSEED_ASM_AVAILABLE 1 -#elif defined(__SUNPRO_CC) +# elif defined(__SUNPRO_CC) # if defined(__RDRND__) && (__SUNPRO_CC >= 0x5130) # define ALL_RDRAND_INTRIN_AVAILABLE 1 # elif (__SUNPRO_CC >= 0x5100) @@ -71,7 +72,7 @@ # elif (__SUNPRO_CC >= 0x5100) # define GCC_RDSEED_ASM_AVAILABLE 1 # endif -#elif defined(CRYPTOPP_GCC_VERSION) +# elif defined(CRYPTOPP_GCC_VERSION) # if defined(__RDRND__) && (CRYPTOPP_GCC_VERSION >= 30200) # define ALL_RDRAND_INTRIN_AVAILABLE 1 # else @@ -82,6 +83,7 @@ # else # define GCC_RDSEED_ASM_AVAILABLE 1 # endif +# endif #endif // Debug diagnostics