Fix SunCC 12.5 failed validation in gcm.cpp (Issue 284)
parent
4fb75a8f4d
commit
2d0e388d9a
6
gcm.cpp
6
gcm.cpp
|
|
@ -94,7 +94,11 @@ __m128i _mm_clmulepi64_si128(const __m128i &a, const __m128i &b, int i)
|
||||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
|
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
|
||||||
inline static void SSE2_Xor16(byte *a, const byte *b, const byte *c)
|
inline static void SSE2_Xor16(byte *a, const byte *b, const byte *c)
|
||||||
{
|
{
|
||||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(__SUNPRO_CC)
|
// SunCC 5.14 crash (bewildering since asserts are not in effect in rlease builds)
|
||||||
|
// Also see http://github.com/weidai11/cryptopp/issues/226
|
||||||
|
# if __SUNPRO_CC
|
||||||
|
*(__m128i *)(void *)a = _mm_xor_si128(*(__m128i *)(void *)b, *(__m128i *)(void *)c);
|
||||||
|
# elif CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
|
||||||
CRYPTOPP_ASSERT(IsAlignedOn(a,GetAlignmentOf<__m128i>()));
|
CRYPTOPP_ASSERT(IsAlignedOn(a,GetAlignmentOf<__m128i>()));
|
||||||
CRYPTOPP_ASSERT(IsAlignedOn(b,GetAlignmentOf<__m128i>()));
|
CRYPTOPP_ASSERT(IsAlignedOn(b,GetAlignmentOf<__m128i>()));
|
||||||
CRYPTOPP_ASSERT(IsAlignedOn(c,GetAlignmentOf<__m128i>()));
|
CRYPTOPP_ASSERT(IsAlignedOn(c,GetAlignmentOf<__m128i>()));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue