diff options
author | Jeffrey Walton <noloader@gmail.com> | 2016-07-24 01:25:30 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2016-07-24 01:25:30 -0400 |
commit | fc5ad7ea7d2113a6f681c13467ddb76c7327bfb8 (patch) | |
tree | 8f1a448d69ec91a5f2523f629760fbb554b841bd /blake2.cpp | |
parent | fa0b378173ec7db4a662079a1a5b111beece7206 (diff) | |
download | cryptopp-git-fc5ad7ea7d2113a6f681c13467ddb76c7327bfb8.tar.gz |
Removed SSE2 and SSE4 restrictions under Visual Studio
Diffstat (limited to 'blake2.cpp')
-rw-r--r-- | blake2.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
@@ -17,18 +17,6 @@ NAMESPACE_BEGIN(CryptoPP) // #undef CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE
// #undef CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE
-// Visual Studio needs both VS2005 (1400) and _M_64 for SSE2 and _mm_set_epi64x()
-// http://msdn.microsoft.com/en-us/library/y0dh78ez%28v=vs.80%29.aspx
-#if defined(_MSC_VER) && ((_MSC_VER < 1400) || !defined(_M_X64))
-# 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
-
// 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))
@@ -37,12 +25,12 @@ NAMESPACE_BEGIN(CryptoPP) // Sun Studio 12.3 and earlier lack SSE2's _mm_set_epi64x.
// Also see http://stackoverflow.com/a/38547909/608639
-#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5130) && CRYPTOPP_BOOL_SSE2_AVAILABLE
-inline __m128i _mm_set_epi64x(const uint64_t a, const uint64_t b)
+#if ((defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5130)) || (defined(_MSC_VER) && (_MSC_VER >= 1200) && (_MSC_VER <= 1400))) && CRYPTOPP_BOOL_SSE2_AVAILABLE
+inline __m128i _mm_set_epi64x(const word64 a, const word64 b)
{
union INT_128_64x2 {
__m128i v128;
- uint64_t v64[2];
+ word64 v64[2];
};
INT_128_64x2 val;
|