diff options
author | Werner Koch <wk@gnupg.org> | 2014-01-28 17:00:27 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-01-28 17:00:27 +0100 |
commit | 52f7c48c901a3de51bd690a218f3de2f71e8d790 (patch) | |
tree | 90f3b1614eaf9dba212163e48abf577dc49479c4 /cipher/salsa20.c | |
parent | cbdc355415f83ed62da4f3618767eba54d7e6d37 (diff) | |
download | libgcrypt-52f7c48c901a3de51bd690a218f3de2f71e8d790.tar.gz |
cipher: Take care of ENABLE_NEON_SUPPORT.
* cipher/salsa20.c (USE_ARM_NEON_ASM): Define only if
ENABLE_NEON_SUPPORT is defined.
* cipher/serpent.c (USE_NEON): Ditto.
* cipher/sha1.c (USE_NEON): Ditto.
* cipher/sha512.c (USE_ARM_NEON_ASM): Ditto.
--
The generic C source files must only include NEON support if that is
enabled. The dedicated ASM files are conditionally compiled and thus
do not need to use it.
GnuPG-bug-id: 1603
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'cipher/salsa20.c')
-rw-r--r-- | cipher/salsa20.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cipher/salsa20.c b/cipher/salsa20.c index 72b28b03..d75fe515 100644 --- a/cipher/salsa20.c +++ b/cipher/salsa20.c @@ -49,12 +49,13 @@ /* USE_ARM_NEON_ASM indicates whether to enable ARM NEON assembly code. */ #undef USE_ARM_NEON_ASM -#if defined(HAVE_ARM_ARCH_V6) && defined(__ARMEL__) -# if defined(HAVE_COMPATIBLE_GCC_ARM_PLATFORM_AS) && \ - defined(HAVE_GCC_INLINE_ASM_NEON) +#ifdef ENABLE_NEON_SUPPORT +# if defined(HAVE_ARM_ARCH_V6) && defined(__ARMEL__) \ + && defined(HAVE_COMPATIBLE_GCC_ARM_PLATFORM_AS) \ + && defined(HAVE_GCC_INLINE_ASM_NEON) # define USE_ARM_NEON_ASM 1 # endif -#endif +#endif /*ENABLE_NEON_SUPPORT*/ #define SALSA20_MIN_KEY_SIZE 16 /* Bytes. */ |