Fix SunCC 12.3 - 12.5 crash in gcm.cpp
$ /opt/developerstudio12.5/bin/CC -DNDEBUG -g2 -O2 -D__SSE2__ -D__SSE3__ -D__SSSE3__ -xarch=ssse3 -Wno-deprecated-declarations -m64 -native -KPIC -template=no%extdef -c gcm.cpp assertion failed in function pr_post_process_node() @ preopt.c:3868 assert(nd_eq_(scope_first_stmt_(node), first_s)) CC: ube failed for gcm.cpppull/286/head
parent
bad74bb3ab
commit
519b41e47e
12
gcm.cpp
12
gcm.cpp
|
|
@ -28,8 +28,10 @@
|
|||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
#if defined(__SUNPRO_CC)
|
||||
# define USE_MOV_REG32_OR_REG64 1
|
||||
// Different assemblers accept different mnemonics: 'movd eax, xmm0' vs 'movd rax, xmm0' vs 'mov eax, xmm0' vs 'mov rax, xmm0'
|
||||
#if (CRYPTOPP_LLVM_CLANG_VERSION >= 30600) || (CRYPTOPP_APPLE_CLANG_VERSION >= 70000) || defined(CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER)
|
||||
#elif (CRYPTOPP_LLVM_CLANG_VERSION >= 30600) || (CRYPTOPP_APPLE_CLANG_VERSION >= 70000) || defined(CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER)
|
||||
// 'movd eax, xmm0' only. REG_WORD() macro not used.
|
||||
# define USE_MOVD_REG32 1
|
||||
#elif (defined(CRYPTOPP_LLVM_CLANG_VERSION) || defined(CRYPTOPP_APPLE_CLANG_VERSION)) && defined(CRYPTOPP_X64_ASM_AVAILABLE)
|
||||
|
|
@ -92,9 +94,9 @@ __m128i _mm_clmulepi64_si128(const __m128i &a, const __m128i &b, int i)
|
|||
#endif
|
||||
|
||||
#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 void SSE2_Xor16(byte *a, const byte *b, const byte *c)
|
||||
{
|
||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
|
||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(__SUNPRO_CC)
|
||||
CRYPTOPP_ASSERT(IsAlignedOn(a,GetAlignmentOf<__m128i>()));
|
||||
CRYPTOPP_ASSERT(IsAlignedOn(b,GetAlignmentOf<__m128i>()));
|
||||
CRYPTOPP_ASSERT(IsAlignedOn(c,GetAlignmentOf<__m128i>()));
|
||||
|
|
@ -106,7 +108,7 @@ inline static void SSE2_Xor16(byte *a, const byte *b, const byte *c)
|
|||
#endif
|
||||
|
||||
#if CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE
|
||||
inline static void NEON_Xor16(byte *a, const byte *b, const byte *c)
|
||||
inline void NEON_Xor16(byte *a, const byte *b, const byte *c)
|
||||
{
|
||||
CRYPTOPP_ASSERT(IsAlignedOn(a,GetAlignmentOf<uint64x2_t>()));
|
||||
CRYPTOPP_ASSERT(IsAlignedOn(b,GetAlignmentOf<uint64x2_t>()));
|
||||
|
|
@ -115,7 +117,7 @@ inline static void NEON_Xor16(byte *a, const byte *b, const byte *c)
|
|||
}
|
||||
#endif
|
||||
|
||||
inline static void Xor16(byte *a, const byte *b, const byte *c)
|
||||
inline void Xor16(byte *a, const byte *b, const byte *c)
|
||||
{
|
||||
CRYPTOPP_ASSERT(IsAlignedOn(a,GetAlignmentOf<word64>()));
|
||||
CRYPTOPP_ASSERT(IsAlignedOn(b,GetAlignmentOf<word64>()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue