summaryrefslogtreecommitdiff
path: root/whrlpool.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-08-18 04:44:53 -0400
committerGitHub <noreply@github.com>2018-08-18 04:44:53 -0400
commit4282f94712ee7b86c36fc656f377d2ce78532f0c (patch)
tree6057c2539f6c7b3fd9daa6a83d1a6de5e8018392 /whrlpool.cpp
parent06cf2ede9e043b4c25eb3521cf67fcebb41b7629 (diff)
downloadcryptopp-git-4282f94712ee7b86c36fc656f377d2ce78532f0c.tar.gz
Disable X32 inline assembly (GH #686, PR #704)
Also use CRYPTOPP_DISABLE_XXX_ASM consistently. The pattern is needed for Clang which still can't compile Intel assembly language. Also see http://llvm.org/bugs/show_bug.cgi?id=24232.
Diffstat (limited to 'whrlpool.cpp')
-rw-r--r--whrlpool.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/whrlpool.cpp b/whrlpool.cpp
index 799b7f3c..4a52a0dd 100644
--- a/whrlpool.cpp
+++ b/whrlpool.cpp
@@ -73,11 +73,11 @@
#include "misc.h"
#include "cpu.h"
-// "Inline assembly operands don't work with .intel_syntax",
-// http://llvm.org/bugs/show_bug.cgi?id=24232
-#if defined(CRYPTOPP_DISABLE_INTEL_ASM)
+#if defined(CRYPTOPP_DISABLE_WHIRLPOOL_ASM)
+# undef CRYPTOPP_X86_ASM_AVAILABLE
+# undef CRYPTOPP_X32_ASM_AVAILABLE
+# undef CRYPTOPP_X64_ASM_AVAILABLE
# undef CRYPTOPP_SSE2_ASM_AVAILABLE
-# undef CRYPTOPP_SSSE3_ASM_AVAILABLE
#endif
NAMESPACE_BEGIN(CryptoPP)
@@ -438,15 +438,13 @@ void Whirlpool::Transform(word64 *digest, const word64 *block)
AS2( mov WORD_REG(cx), digest)
AS2( mov WORD_REG(dx), block)
#endif
-#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32
+#if CRYPTOPP_BOOL_X86
AS2( mov eax, esp)
AS2( and esp, -16)
AS2( sub esp, 16*8)
AS_PUSH_IF86( ax)
#if CRYPTOPP_BOOL_X86
#define SSE2_workspace esp+WORD_SZ
- #elif CRYPTOPP_BOOL_X32
- #define SSE2_workspace esp+(WORD_SZ*2)
#endif
#else
#define SSE2_workspace %3