diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2015-05-02 12:57:07 +0300 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2015-05-02 12:57:07 +0300 |
commit | e433676a899fa0d274d40547166b03c7c8bd8e78 (patch) | |
tree | 4c952ee4a2bbd8bd7b4aee698ecf408fdc4a6c36 /cipher/sha1-ssse3-amd64.S | |
parent | 4e09aaa36d151c3312019724a77fc09aa345b82f (diff) | |
download | libgcrypt-e433676a899fa0d274d40547166b03c7c8bd8e78.tar.gz |
Enable AMD64 SHA1 implementations for WIN64
* cipher/sha1-avx-amd64.S: Enable when
HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS defined.
(ELF): New macro to mask lines with ELF specific commands.
* cipher/sha1-avx-bmi2-amd64.S: Ditto.
* cipher/sha1-ssse3-amd64.S: Ditto.
* cipher/sha1.c (USE_SSSE3, USE_AVX, USE_BMI2): Enable
when HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS defined.
[USE_SSSE3 || USE_AVX || USE_BMI2] (ASM_FUNC_ABI)
(ASM_EXTRA_STACK): New.
(_gcry_sha1_transform_amd64_ssse3, _gcry_sha1_transform_amd64_avx)
(_gcry_sha1_transform_amd64_avx_bmi2): Add ASM_FUNC_ABI to
prototypes.
(transform): Add ASM_EXTRA_STACK to stack burn value.
--
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'cipher/sha1-ssse3-amd64.S')
-rw-r--r-- | cipher/sha1-ssse3-amd64.S | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cipher/sha1-ssse3-amd64.S b/cipher/sha1-ssse3-amd64.S index 226988da..98a19e60 100644 --- a/cipher/sha1-ssse3-amd64.S +++ b/cipher/sha1-ssse3-amd64.S @@ -29,7 +29,8 @@ #ifdef __x86_64__ #include <config.h> -#if defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) && \ +#if (defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) || \ + defined(HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS)) && \ defined(HAVE_GCC_INLINE_ASM_SSSE3) && defined(USE_SHA1) #ifdef __PIC__ @@ -39,6 +40,13 @@ #endif +#ifdef HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS +# define ELF(...) __VA_ARGS__ +#else +# define ELF(...) /*_*/ +#endif + + /* Context structure */ #define state_h0 0 @@ -220,7 +228,7 @@ */ .text .globl _gcry_sha1_transform_amd64_ssse3 -.type _gcry_sha1_transform_amd64_ssse3,@function +ELF(.type _gcry_sha1_transform_amd64_ssse3,@function) .align 16 _gcry_sha1_transform_amd64_ssse3: /* input: |