From 29b560eba79631436fa475dde1f18ece434befed Mon Sep 17 00:00:00 2001 From: Daniel Seither Date: Tue, 13 Oct 2015 12:50:31 +0200 Subject: Initial support for 64 bit ARM This adds support for 64 bit ARM cores as used in many high-end phones such as all iPhones beginning with the 5s. While these newer phones still run 32 bit ARM code, Apple doesn't allow apps to be submitted to the app store if they don't provide a 64 bit build. This commit adds a new arm64 arch and renames arm to arm32 to stay consistent with the other architectures. The name arm can still be used for configuring because it has been added as an alias for arm32. Additionally, the one piece of ARM inline assembly that can be found in Botan doesn't work on 64 bit ARM, so I use the solution that has been proposed in #180: Use __builtin_bswap32 instead of inline assembly. --- src/lib/utils/bswap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/utils/bswap.h b/src/lib/utils/bswap.h index 6773b196d..beb3f9555 100644 --- a/src/lib/utils/bswap.h +++ b/src/lib/utils/bswap.h @@ -31,7 +31,7 @@ inline u16bit reverse_bytes(u16bit val) */ inline u32bit reverse_bytes(u32bit val) { -#if BOTAN_GCC_VERSION >= 430 && !defined(BOTAN_TARGET_CPU_IS_ARM_FAMILY) +#if BOTAN_GCC_VERSION >= 430 && !defined(BOTAN_TARGET_ARCH_IS_ARM32) /* GCC intrinsic added in 4.3, works for a number of CPUs @@ -47,7 +47,7 @@ inline u32bit reverse_bytes(u32bit val) asm("bswapl %0" : "=r" (val) : "0" (val)); return val; -#elif defined(BOTAN_USE_GCC_INLINE_ASM) && defined(BOTAN_TARGET_CPU_IS_ARM_FAMILY) +#elif defined(BOTAN_USE_GCC_INLINE_ASM) && defined(BOTAN_TARGET_ARCH_IS_ARM32) asm ("eor r3, %1, %1, ror #16\n\t" "bic r3, r3, #0x00FF0000\n\t" -- cgit v1.2.3