cipher: Take care of ENABLE_NEON_SUPPORT.
authorWerner Koch <wk@gnupg.org>
Tue, 28 Jan 2014 16:00:27 +0000 (17:00 +0100)
committerWerner Koch <wk@gnupg.org>
Tue, 28 Jan 2014 16:00:27 +0000 (17:00 +0100)
* 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>
cipher/salsa20.c
cipher/serpent.c
cipher/sha1.c
cipher/sha512.c

index 72b28b0..d75fe51 100644 (file)
 
 /* 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.  */
index 8e647d4..0be49da 100644 (file)
 
 /* USE_NEON indicates whether to enable ARM NEON assembly code. */
 #undef USE_NEON
-#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_NEON 1
 # endif
-#endif
-
+#endif /*ENABLE_NEON_SUPPORT*/
 
 /* Number of rounds per Serpent encrypt/decrypt operation.  */
 #define ROUNDS 32
index 65bd686..00c57dd 100644 (file)
 
 /* USE_NEON indicates whether to enable ARM NEON assembly code. */
 #undef USE_NEON
-#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_NEON 1
 # endif
-#endif
+#endif /*ENABLE_NEON_SUPPORT*/
 
 
 /* A macro to test whether P is properly aligned for an u32 type.
index 92b4913..7d60df0 100644 (file)
 
 /* 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*/
 
 
 /* USE_SSSE3 indicates whether to compile with Intel SSSE3 code. */