diff --git a/blake2.cpp b/blake2.cpp index 7e86a98f..593795d7 100644 --- a/blake2.cpp +++ b/blake2.cpp @@ -22,6 +22,12 @@ NAMESPACE_BEGIN(CryptoPP) # undef CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE #endif +// Visual Studio needs VS2008 (1500); no dependency on _mm_set_epi64x() +// http://msdn.microsoft.com/en-us/library/bb892950%28v=vs.90%29.aspx +#if defined(_MSC_VER) && (_MSC_VER < 1500) +# undef CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE +#endif + // SunCC needs 12.4 for _mm_set_epi64x, _mm_blend_epi16, _mm_shuffle_epi16, etc #if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5130) # undef CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE @@ -32,12 +38,6 @@ NAMESPACE_BEGIN(CryptoPP) # include // _mm_shuffle_epi16 #endif -// Visual Studio needs VS2008 (1500); no dependency on _mm_set_epi64x() -// http://msdn.microsoft.com/en-us/library/bb892950%28v=vs.90%29.aspx -#if defined(_MSC_VER) && (_MSC_VER < 1500) -# undef CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE -#endif - // Apple Clang 6.0/Clang 3.5 does not have SSSE3 intrinsics // http://llvm.org/bugs/show_bug.cgi?id=20213 #if (defined(CRYPTOPP_APPLE_CLANG_VERSION) && (CRYPTOPP_APPLE_CLANG_VERSION <= 60000)) || (defined(CRYPTOPP_LLVM_CLANG_VERSION) && (CRYPTOPP_LLVM_CLANG_VERSION <= 30500)) diff --git a/config.h b/config.h index 9a40f2ba..39b11d87 100644 --- a/config.h +++ b/config.h @@ -416,8 +416,8 @@ NAMESPACE_END // Sun Studio 12 provides GCC inline assembly, http://blogs.oracle.com/x86be/entry/gcc_style_asm_inlining_support // We can enable SSE2 for Sun Studio in the makefile with -D__SSE2__, but users may not compile with it. -#if !defined(CRYPTOPP_DISABLE_ASM) && defined(__x86_64__) && (__SUNPRO_CC >= 0x5100) && !defined(__SSE2__) -# define __SSE2__ 1 +#if !defined(CRYPTOPP_DISABLE_ASM) && !defined(__SSE2__) && defined(__x86_64__) && (__SUNPRO_CC >= 0x5100) +# define __SSE2__ #endif #if !defined(CRYPTOPP_DISABLE_ASM) && ((defined(_MSC_VER) && defined(_M_IX86)) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))) @@ -456,7 +456,7 @@ NAMESPACE_END // Intrinsics availible in GCC 4.3 (http://gcc.gnu.org/gcc-4.3/changes.html) and // MSVC 2008 (http://msdn.microsoft.com/en-us/library/bb892950%28v=vs.90%29.aspx) -#if !defined(CRYPTOPP_DISABLE_SSE2) && !defined(CRYPTOPP_DISABLE_SSE4) && (((_MSC_VER >= 1500) && !defined(_M_ARM)) || defined(__SSE4_2__)) +#if !defined(CRYPTOPP_DISABLE_SSE2) && !defined(CRYPTOPP_DISABLE_SSE4) && (((_MSC_VER >= 1500) && !defined(_M_ARM)) || defined(__SSE4_2__)) && (!defined(__SUNPRO_CC) || (defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130))) #define CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE 1 #else #define CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE 0 diff --git a/config.recommend b/config.recommend index 713a6780..4e24db31 100644 --- a/config.recommend +++ b/config.recommend @@ -416,8 +416,8 @@ NAMESPACE_END // Sun Studio 12 provides GCC inline assembly, http://blogs.oracle.com/x86be/entry/gcc_style_asm_inlining_support // We can enable SSE2 for Sun Studio in the makefile with -D__SSE2__, but users may not compile with it. -#if !defined(CRYPTOPP_DISABLE_ASM) && defined(__x86_64__) && (__SUNPRO_CC >= 0x5100) && !defined(__SSE2__) -# define __SSE2__ 1 +#if !defined(CRYPTOPP_DISABLE_ASM) && !defined(__SSE2__) && defined(__x86_64__) && (__SUNPRO_CC >= 0x5100) +# define __SSE2__ #endif #if !defined(CRYPTOPP_DISABLE_ASM) && ((defined(_MSC_VER) && defined(_M_IX86)) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))) @@ -456,7 +456,7 @@ NAMESPACE_END // Intrinsics availible in GCC 4.3 (http://gcc.gnu.org/gcc-4.3/changes.html) and // MSVC 2008 (http://msdn.microsoft.com/en-us/library/bb892950%28v=vs.90%29.aspx) -#if !defined(CRYPTOPP_DISABLE_SSE2) && !defined(CRYPTOPP_DISABLE_SSE4) && (((_MSC_VER >= 1500) && !defined(_M_ARM)) || defined(__SSE4_2__)) +#if !defined(CRYPTOPP_DISABLE_SSE2) && !defined(CRYPTOPP_DISABLE_SSE4) && (((_MSC_VER >= 1500) && !defined(_M_ARM)) || defined(__SSE4_2__)) && (!defined(__SUNPRO_CC) || (defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130))) #define CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE 1 #else #define CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE 0