summaryrefslogtreecommitdiff
path: root/cipher/camellia-aesni-avx-amd64.S
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/camellia-aesni-avx-amd64.S')
-rw-r--r--cipher/camellia-aesni-avx-amd64.S41
1 files changed, 24 insertions, 17 deletions
diff --git a/cipher/camellia-aesni-avx-amd64.S b/cipher/camellia-aesni-avx-amd64.S
index 6d157a7f..c047a21e 100644
--- a/cipher/camellia-aesni-avx-amd64.S
+++ b/cipher/camellia-aesni-avx-amd64.S
@@ -20,7 +20,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(ENABLE_AESNI_SUPPORT) && defined(ENABLE_AVX_SUPPORT)
#ifdef __PIC__
@@ -29,6 +30,12 @@
# define RIP
#endif
+#ifdef HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS
+# define ELF(...) __VA_ARGS__
+#else
+# define ELF(...) /*_*/
+#endif
+
#define CAMELLIA_TABLE_BYTE_LEN 272
/* struct CAMELLIA_context: */
@@ -769,7 +776,7 @@
.text
.align 8
-.type __camellia_enc_blk16,@function;
+ELF(.type __camellia_enc_blk16,@function;)
__camellia_enc_blk16:
/* input:
@@ -853,10 +860,10 @@ __camellia_enc_blk16:
%xmm15, %rax, %rcx, 24);
jmp .Lenc_done;
-.size __camellia_enc_blk16,.-__camellia_enc_blk16;
+ELF(.size __camellia_enc_blk16,.-__camellia_enc_blk16;)
.align 8
-.type __camellia_dec_blk16,@function;
+ELF(.type __camellia_dec_blk16,@function;)
__camellia_dec_blk16:
/* input:
@@ -938,7 +945,7 @@ __camellia_dec_blk16:
((key_table + (24) * 8) + 4)(CTX));
jmp .Ldec_max24;
-.size __camellia_dec_blk16,.-__camellia_dec_blk16;
+ELF(.size __camellia_dec_blk16,.-__camellia_dec_blk16;)
#define inc_le128(x, minus_one, tmp) \
vpcmpeqq minus_one, x, tmp; \
@@ -948,7 +955,7 @@ __camellia_dec_blk16:
.align 8
.globl _gcry_camellia_aesni_avx_ctr_enc
-.type _gcry_camellia_aesni_avx_ctr_enc,@function;
+ELF(.type _gcry_camellia_aesni_avx_ctr_enc,@function;)
_gcry_camellia_aesni_avx_ctr_enc:
/* input:
@@ -1062,11 +1069,11 @@ _gcry_camellia_aesni_avx_ctr_enc:
leave;
ret;
-.size _gcry_camellia_aesni_avx_ctr_enc,.-_gcry_camellia_aesni_avx_ctr_enc;
+ELF(.size _gcry_camellia_aesni_avx_ctr_enc,.-_gcry_camellia_aesni_avx_ctr_enc;)
.align 8
.globl _gcry_camellia_aesni_avx_cbc_dec
-.type _gcry_camellia_aesni_avx_cbc_dec,@function;
+ELF(.type _gcry_camellia_aesni_avx_cbc_dec,@function;)
_gcry_camellia_aesni_avx_cbc_dec:
/* input:
@@ -1130,11 +1137,11 @@ _gcry_camellia_aesni_avx_cbc_dec:
leave;
ret;
-.size _gcry_camellia_aesni_avx_cbc_dec,.-_gcry_camellia_aesni_avx_cbc_dec;
+ELF(.size _gcry_camellia_aesni_avx_cbc_dec,.-_gcry_camellia_aesni_avx_cbc_dec;)
.align 8
.globl _gcry_camellia_aesni_avx_cfb_dec
-.type _gcry_camellia_aesni_avx_cfb_dec,@function;
+ELF(.type _gcry_camellia_aesni_avx_cfb_dec,@function;)
_gcry_camellia_aesni_avx_cfb_dec:
/* input:
@@ -1202,7 +1209,7 @@ _gcry_camellia_aesni_avx_cfb_dec:
leave;
ret;
-.size _gcry_camellia_aesni_avx_cfb_dec,.-_gcry_camellia_aesni_avx_cfb_dec;
+ELF(.size _gcry_camellia_aesni_avx_cfb_dec,.-_gcry_camellia_aesni_avx_cfb_dec;)
/*
* IN:
@@ -1309,7 +1316,7 @@ _gcry_camellia_aesni_avx_cfb_dec:
.text
.align 8
-.type __camellia_avx_setup128,@function;
+ELF(.type __camellia_avx_setup128,@function;)
__camellia_avx_setup128:
/* input:
* %rdi: ctx, CTX; subkey storage at key_table(CTX)
@@ -1650,10 +1657,10 @@ __camellia_avx_setup128:
vzeroall;
ret;
-.size __camellia_avx_setup128,.-__camellia_avx_setup128;
+ELF(.size __camellia_avx_setup128,.-__camellia_avx_setup128;)
.align 8
-.type __camellia_avx_setup256,@function;
+ELF(.type __camellia_avx_setup256,@function;)
__camellia_avx_setup256:
/* input:
@@ -2127,11 +2134,11 @@ __camellia_avx_setup256:
vzeroall;
ret;
-.size __camellia_avx_setup256,.-__camellia_avx_setup256;
+ELF(.size __camellia_avx_setup256,.-__camellia_avx_setup256;)
.align 8
.globl _gcry_camellia_aesni_avx_keygen
-.type _gcry_camellia_aesni_avx_keygen,@function;
+ELF(.type _gcry_camellia_aesni_avx_keygen,@function;)
_gcry_camellia_aesni_avx_keygen:
/* input:
@@ -2159,7 +2166,7 @@ _gcry_camellia_aesni_avx_keygen:
vpor %xmm2, %xmm1, %xmm1;
jmp __camellia_avx_setup256;
-.size _gcry_camellia_aesni_avx_keygen,.-_gcry_camellia_aesni_avx_keygen;
+ELF(.size _gcry_camellia_aesni_avx_keygen,.-_gcry_camellia_aesni_avx_keygen;)
#endif /*defined(ENABLE_AESNI_SUPPORT) && defined(ENABLE_AVX_SUPPORT)*/
#endif /*__x86_64*/