diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/crypto/zinc/chacha20/chacha20-arm.pl | 2 | ||||
-rw-r--r-- | src/crypto/zinc/chacha20/chacha20-arm64.pl | 3 | ||||
-rw-r--r-- | src/crypto/zinc/poly1305/poly1305-arm.pl | 2 | ||||
-rw-r--r-- | src/crypto/zinc/poly1305/poly1305-arm64.pl | 12 |
4 files changed, 11 insertions, 8 deletions
diff --git a/src/crypto/zinc/chacha20/chacha20-arm.pl b/src/crypto/zinc/chacha20/chacha20-arm.pl index 3621957..6a7d62c 100644 --- a/src/crypto/zinc/chacha20/chacha20-arm.pl +++ b/src/crypto/zinc/chacha20/chacha20-arm.pl @@ -693,7 +693,7 @@ my ($a,$b,$c,$d,$t)=@_; } $code.=<<___; -#if __ARM_MAX_ARCH__>=7 +#if (defined(__KERNEL__) && defined(CONFIG_KERNEL_MODE_NEON)) || (!defined(__KERNEL__) && __ARM_MAX_ARCH__>=7) .arch armv7-a .fpu neon diff --git a/src/crypto/zinc/chacha20/chacha20-arm64.pl b/src/crypto/zinc/chacha20/chacha20-arm64.pl index 7926c8d..bb148c2 100644 --- a/src/crypto/zinc/chacha20/chacha20-arm64.pl +++ b/src/crypto/zinc/chacha20/chacha20-arm64.pl @@ -385,7 +385,7 @@ my ($a,$b,$c,$d,$t)=@_; } $code.=<<___; - +#if !defined(__KERNEL__) || defined(CONFIG_KERNEL_MODE_NEON) #ifdef __KERNEL__ .globl ChaCha20_neon .type ChaCha20_neon,%function @@ -1136,6 +1136,7 @@ $code.=<<___; ret .size ChaCha20_512_neon,.-ChaCha20_512_neon #endif +#endif ___ } }}} diff --git a/src/crypto/zinc/poly1305/poly1305-arm.pl b/src/crypto/zinc/poly1305/poly1305-arm.pl index 88a4260..30a2005 100644 --- a/src/crypto/zinc/poly1305/poly1305-arm.pl +++ b/src/crypto/zinc/poly1305/poly1305-arm.pl @@ -460,7 +460,7 @@ my ($T0,$T1,$MASK) = map("q$_",(15,4,0)); my ($in2,$zeros,$tbl0,$tbl1) = map("r$_",(4..7)); $code.=<<___; -#if __ARM_MAX_ARCH__>=7 +#if (defined(__KERNEL__) && defined(CONFIG_KERNEL_MODE_NEON)) || (!defined(__KERNEL__) && __ARM_MAX_ARCH__>=7) .fpu neon .type poly1305_init_neon,%function diff --git a/src/crypto/zinc/poly1305/poly1305-arm64.pl b/src/crypto/zinc/poly1305/poly1305-arm64.pl index cf0ce9d..d513b45 100644 --- a/src/crypto/zinc/poly1305/poly1305-arm64.pl +++ b/src/crypto/zinc/poly1305/poly1305-arm64.pl @@ -68,11 +68,6 @@ $code.=<<___; // forward "declarations" are required for Apple .globl poly1305_blocks .globl poly1305_emit -#ifdef __KERNEL__ -.globl poly1305_blocks_neon -.globl poly1305_emit_neon -#endif - .globl poly1305_init .type poly1305_init,%function .align 5 @@ -301,6 +296,12 @@ __poly1305_splat: ret .size __poly1305_splat,.-__poly1305_splat +#if !defined(__KERNEL__) || defined(CONFIG_KERNEL_MODE_NEON) +#ifdef __KERNEL__ +.globl poly1305_blocks_neon +.globl poly1305_emit_neon +#endif + .type poly1305_blocks_neon,%function .align 5 poly1305_blocks_neon: @@ -933,6 +934,7 @@ poly1305_emit_neon: ret .size poly1305_emit_neon,.-poly1305_emit_neon +#endif .align 5 .Lzeros: |