diff options
author | Andy Polyakov <appro@openssl.org> | 2014-06-01 17:21:06 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2014-06-10 23:20:55 +0200 |
commit | dabfbea7d91619b286e5d32ffc68ec7e5bd7e9bf (patch) | |
tree | 8818defbbd319f9bd338ffcf2ae17754233d4c7a /crypto/arm_arch.h | |
parent | 56d973709c02a1936ae35c40de56cff478713c45 (diff) |
Add linux-aarch64 taget.
armcap.c is shared between 32- and 64-bit builds and features link-time
detection of getauxval.
Submitted by: Ard Biesheuvel.
(cherry picked from commit e8d93e342b4b7d43c73e955e81e227c514d389d9)
Diffstat (limited to 'crypto/arm_arch.h')
-rw-r--r-- | crypto/arm_arch.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/crypto/arm_arch.h b/crypto/arm_arch.h index d68318c851..6fa87244d1 100644 --- a/crypto/arm_arch.h +++ b/crypto/arm_arch.h @@ -10,13 +10,24 @@ # define __ARMEL__ # endif # elif defined(__GNUC__) +# if defined(__aarch64__) +# define __ARM_ARCH__ 8 +# if __BYTE_ORDER__==__ORDER_BIG_ENDIAN__ +# define __ARMEB__ +# else +# define __ARMEL__ +# endif /* * Why doesn't gcc define __ARM_ARCH__? Instead it defines * bunch of below macros. See all_architectires[] table in * gcc/config/arm/arm.c. On a side note it defines * __ARMEL__/__ARMEB__ for little-/big-endian. */ -# if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \ +# elif defined(__ARM_ARCH) +# define __ARM_ARCH__ __ARM_ARCH +# elif defined(__ARM_ARCH_8A__) +# define __ARM_ARCH__ 8 +# elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \ defined(__ARM_ARCH_7R__)|| defined(__ARM_ARCH_7M__) || \ defined(__ARM_ARCH_7EM__) # define __ARM_ARCH__ 7 @@ -43,6 +54,7 @@ #if !__ASSEMBLER__ extern unsigned int OPENSSL_armcap_P; +#endif #define ARMV7_NEON (1<<0) #define ARMV7_TICK (1<<1) @@ -50,6 +62,5 @@ extern unsigned int OPENSSL_armcap_P; #define ARMV8_SHA1 (1<<3) #define ARMV8_SHA256 (1<<4) #define ARMV8_PMULL (1<<5) -#endif #endif |