summaryrefslogtreecommitdiff
path: root/blake2.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-07-10 16:21:19 -0400
committerJeffrey Walton <noloader@gmail.com>2016-07-10 16:21:19 -0400
commitf8200af3ae18c564bfb260ee5ce52c6df74dee78 (patch)
treee8e69c04b58c1a2aee5c9de26761609ac3e56cb8 /blake2.cpp
parent36da00cc9293aa7f5297489e7d32d0cb19e2a4a4 (diff)
downloadcryptopp-git-f8200af3ae18c564bfb260ee5ce52c6df74dee78.tar.gz
Add SunCC 12.4 support for specialized implementations if CRC, RDRAND and BLAKE2
Diffstat (limited to 'blake2.cpp')
-rw-r--r--blake2.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/blake2.cpp b/blake2.cpp
index 0cb858b1..7e86a98f 100644
--- a/blake2.cpp
+++ b/blake2.cpp
@@ -22,9 +22,14 @@ NAMESPACE_BEGIN(CryptoPP)
# undef CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
#endif
-// Testing shows Sun CC needs 12.4 for _mm_set_epi64x
-#if (__SUNPRO_CC <= 0x5130)
+// 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
+# undef CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE
+#elif (__SUNPRO_CC >= 0x5130)
+# include <emmintrin.h> // _mm_set_epi64x
+# include <smmintrin.h> // _mm_blend_epi16
+# include <tmmintrin.h> // _mm_shuffle_epi16
#endif
// Visual Studio needs VS2008 (1500); no dependency on _mm_set_epi64x()