Disable X32 inline ASM for Tiger

See Peter Cordes comments at Issue 686
pull/696/head
Jeffrey Walton 2018-07-21 06:36:15 -04:00
parent d4f86d7320
commit 61f1456a5a
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 3 additions and 11 deletions

View File

@ -42,7 +42,7 @@ void Tiger::TruncatedFinal(byte *hash, size_t size)
void Tiger::Transform (word64 *digest, const word64 *X)
{
#if CRYPTOPP_SSE2_ASM_AVAILABLE && (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32)
#if CRYPTOPP_SSE2_ASM_AVAILABLE && CRYPTOPP_BOOL_X86
if (HasSSE2())
{
#ifdef __GNUC__
@ -182,19 +182,11 @@ void Tiger::Transform (word64 *digest, const word64 *X)
AS2( psubq mm3, mm4)\
AS2( movq [Y+7*8], mm3)
#if CRYPTOPP_BOOL_X32
SSE2_pass(mm0, mm1, mm2, 5, esi)
SSE2_key_schedule(esp+8, esi)
SSE2_pass(mm2, mm0, mm1, 7, esp+8)
SSE2_key_schedule(esp+8, esp+8)
SSE2_pass(mm1, mm2, mm0, 9, esp+8)
#else
SSE2_pass(mm0, mm1, mm2, 5, esi)
SSE2_key_schedule(esp+4, esi)
SSE2_pass(mm2, mm0, mm1, 7, esp+4)
SSE2_key_schedule(esp+4, esp+4)
SSE2_pass(mm1, mm2, mm0, 9, esp+4)
#endif
AS2( pxor mm0, [eax+0*8])
AS2( movq [eax+0*8], mm0)

View File

@ -12,8 +12,8 @@
// Clang 3.3 integrated assembler crash on Linux
// http://github.com/weidai11/cryptopp/issues/264
#if defined(CRYPTOPP_LLVM_CLANG_VERSION) && (CRYPTOPP_LLVM_CLANG_VERSION < 30400)
# define CRYPTOPP_DISABLE_TIGER_ASM
#if (defined(CRYPTOPP_LLVM_CLANG_VERSION) && (CRYPTOPP_LLVM_CLANG_VERSION < 30400)) || CRYPTOPP_BOOL_X32
# define CRYPTOPP_DISABLE_TIGER_ASM 1
#endif
NAMESPACE_BEGIN(CryptoPP)