mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-03-01 18:06:05 +00:00
Add replacement for _mm_set_epi64x under Sun Studio 12.3 and below
This commit is contained in:
parent
7378a1b86d
commit
f532b02a96
16
blake2.cpp
16
blake2.cpp
@ -34,10 +34,20 @@ NAMESPACE_BEGIN(CryptoPP)
|
||||
# undef CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE
|
||||
#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)
|
||||
# undef CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
|
||||
# undef CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE
|
||||
inline __m128i _mm_set_epi64x(const uint64_t a, const uint64_t b)
|
||||
{
|
||||
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
|
||||
|
||||
// C/C++ implementation
|
||||
|
Loading…
x
Reference in New Issue
Block a user