summaryrefslogtreecommitdiff
path: root/cipher/whirlpool-sse2-amd64.S
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2015-05-02 13:26:46 +0300
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2015-05-02 14:43:03 +0300
commit8422d5d699265b960bd1ca837044ee052fc5b614 (patch)
treee33e3c7aed5023a44a45182d1d29bdb8803a9831 /cipher/whirlpool-sse2-amd64.S
parent1089a13073c26a9a456e43ec38d937e6ee7f4077 (diff)
downloadlibgcrypt-8422d5d699265b960bd1ca837044ee052fc5b614.tar.gz
Enable AMD64 Whirlpool implementation for WIN64
* cipher/whirlpool-sse2-amd64.S: Enable when HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS defined. (ELF): New macro to mask lines with ELF specific commands. * cipher/whirlpool.c (USE_AMD64_ASM): Enable when HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS defined. [USE_AMD64_ASM] (ASM_FUNC_ABI, ASM_EXTRA_STACK): New. [USE_AMD64_ASM] (_gcry_whirlpool_transform_amd64): Add ASM_FUNC_ABI to prototype. [USE_AMD64_ASM] (whirlpool_transform): Add ASM_EXTRA_STACK to stack burn value. -- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'cipher/whirlpool-sse2-amd64.S')
-rw-r--r--cipher/whirlpool-sse2-amd64.S13
1 files changed, 10 insertions, 3 deletions
diff --git a/cipher/whirlpool-sse2-amd64.S b/cipher/whirlpool-sse2-amd64.S
index d0bcf2d9..e98b831c 100644
--- a/cipher/whirlpool-sse2-amd64.S
+++ b/cipher/whirlpool-sse2-amd64.S
@@ -20,7 +20,8 @@
#ifdef __x86_64
#include <config.h>
-#if defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) && defined(USE_WHIRLPOOL)
+#if (defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) || \
+ defined(HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS)) && defined(USE_WHIRLPOOL)
#ifdef __PIC__
# define RIP %rip
@@ -28,6 +29,12 @@
# define RIP
#endif
+#ifdef HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS
+# define ELF(...) __VA_ARGS__
+#else
+# define ELF(...) /*_*/
+#endif
+
.text
/* look-up table offsets on RTAB */
@@ -157,7 +164,7 @@
.align 8
.globl _gcry_whirlpool_transform_amd64
-.type _gcry_whirlpool_transform_amd64,@function;
+ELF(.type _gcry_whirlpool_transform_amd64,@function;)
_gcry_whirlpool_transform_amd64:
/* input:
@@ -329,7 +336,7 @@ _gcry_whirlpool_transform_amd64:
.Lskip:
movl $(STACK_MAX + 8), %eax;
ret;
-.size _gcry_whirlpool_transform_amd64,.-_gcry_whirlpool_transform_amd64;
+ELF(.size _gcry_whirlpool_transform_amd64,.-_gcry_whirlpool_transform_amd64;)
#endif
#endif