Fix building AArch32 CE implementations when target is ARMv6 arch
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Sat, 29 Jul 2017 11:34:23 +0000 (14:34 +0300)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Sat, 29 Jul 2017 11:34:44 +0000 (14:34 +0300)
* cipher/cipher-gcm-armv8-aarch32-ce.S: Select ARMv8 architecure.
* cipher/rijndael-armv8-aarch32-ce.S: Ditto.
* cipher/sha1-armv8-aarch32-ce.S: Ditto.
* cipher/sha256-armv8-aarch32-ce.S: Ditto.
* configure.ac (gcry_cv_gcc_inline_asm_aarch32_crypto): Ditto.
--

Raspbian distribution defaults to ARMv6 architecture thus 'rbit'
instruction is not available with default compiler flags. Patch
adds explicit architecture selection for ARMv8 to enable 'rbit'
usage with ARMv8/AArch32-CE assembly implementations of SHA,
GHASH and AES.

Reported-by: Chris Horry <zerbey@gmail.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/cipher-gcm-armv8-aarch32-ce.S
cipher/rijndael-armv8-aarch32-ce.S
cipher/sha1-armv8-aarch32-ce.S
cipher/sha256-armv8-aarch32-ce.S
configure.ac

index b61a787..1de66a1 100644 (file)
@@ -24,6 +24,7 @@
     defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO)
 
 .syntax unified
+.arch armv8-a
 .fpu crypto-neon-fp-armv8
 .arm
 
index f375f67..5c8fa3c 100644 (file)
@@ -24,6 +24,7 @@
     defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO)
 
 .syntax unified
+.arch armv8-a
 .fpu crypto-neon-fp-armv8
 .arm
 
index b0bc5ff..bf2b233 100644 (file)
@@ -24,6 +24,7 @@
     defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO) && defined(USE_SHA1)
 
 .syntax unified
+.arch armv8-a
 .fpu crypto-neon-fp-armv8
 .arm
 
index 2041a23..2b17ab1 100644 (file)
@@ -24,6 +24,7 @@
     defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO) && defined(USE_SHA256)
 
 .syntax unified
+.arch armv8-a
 .fpu crypto-neon-fp-armv8
 .arm
 
index 27faa7f..66e7cd6 100644 (file)
@@ -1619,6 +1619,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports AArch32 Crypto Extension i
           AC_COMPILE_IFELSE([AC_LANG_SOURCE(
           [[__asm__(
                 ".syntax unified\n\t"
+                ".arch armv8-a\n\t"
                 ".arm\n\t"
                 ".fpu crypto-neon-fp-armv8\n\t"