Add replacement for _mm_set_epi64x under Sun Studio 12.3 and below
parent
7378a1b86d
commit
f532b02a96
16
blake2.cpp
16
blake2.cpp
|
|
@ -34,10 +34,20 @@ NAMESPACE_BEGIN(CryptoPP)
|
||||||
# undef CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE
|
# undef CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// SunCC needs 12.4 for _mm_set_epi64x, _mm_blend_epi16, _mm_shuffle_epi16, etc
|
// 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)
|
#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5130)
|
||||||
# undef CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
|
inline __m128i _mm_set_epi64x(const uint64_t a, const uint64_t b)
|
||||||
# undef CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE
|
{
|
||||||
|
union INT_128_64 {
|
||||||
|
__m128i v128;
|
||||||
|
uint64_t v64[2];
|
||||||
|
};
|
||||||
|
|
||||||
|
INT_128_64 v;
|
||||||
|
v.v64[0] = a; v.v64[1] = b;
|
||||||
|
return v.v128;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// C/C++ implementation
|
// C/C++ implementation
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue