2 # define __ARM_ARCH_H__
4 # if !defined(__ARM_ARCH__)
6 # define __ARM_ARCH__ __TARGET_ARCH_ARM
7 # if defined(__BIG_ENDIAN)
12 # elif defined(__GNUC__)
13 # if defined(__aarch64__)
14 # define __ARM_ARCH__ 8
15 # if __BYTE_ORDER__==__ORDER_BIG_ENDIAN__
21 * Why doesn't gcc define __ARM_ARCH__? Instead it defines
22 * bunch of below macros. See all_architectires[] table in
23 * gcc/config/arm/arm.c. On a side note it defines
24 * __ARMEL__/__ARMEB__ for little-/big-endian.
26 # elif defined(__ARM_ARCH)
27 # define __ARM_ARCH__ __ARM_ARCH
28 # elif defined(__ARM_ARCH_8A__)
29 # define __ARM_ARCH__ 8
30 # elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
31 defined(__ARM_ARCH_7R__)|| defined(__ARM_ARCH_7M__) || \
32 defined(__ARM_ARCH_7EM__)
33 # define __ARM_ARCH__ 7
34 # elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \
35 defined(__ARM_ARCH_6K__)|| defined(__ARM_ARCH_6M__) || \
36 defined(__ARM_ARCH_6Z__)|| defined(__ARM_ARCH_6ZK__) || \
37 defined(__ARM_ARCH_6T2__)
38 # define __ARM_ARCH__ 6
39 # elif defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || \
40 defined(__ARM_ARCH_5E__)|| defined(__ARM_ARCH_5TE__) || \
41 defined(__ARM_ARCH_5TEJ__)
42 # define __ARM_ARCH__ 5
43 # elif defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__)
44 # define __ARM_ARCH__ 4
46 # error "unsupported ARM architecture"
51 # if !defined(__ARM_MAX_ARCH__)
52 # define __ARM_MAX_ARCH__ __ARM_ARCH__
55 # if __ARM_MAX_ARCH__<__ARM_ARCH__
56 # error "__ARM_MAX_ARCH__ can't be less than __ARM_ARCH__"
57 # elif __ARM_MAX_ARCH__!=__ARM_ARCH__
58 # if __ARM_ARCH__<7 && __ARM_MAX_ARCH__>=7 && defined(__ARMEB__)
59 # error "can't build universal big-endian binary"
64 extern unsigned int OPENSSL_armcap_P;
67 # define ARMV7_NEON (1<<0)
68 # define ARMV7_TICK (1<<1)
69 # define ARMV8_AES (1<<2)
70 # define ARMV8_SHA1 (1<<3)
71 # define ARMV8_SHA256 (1<<4)
72 # define ARMV8_PMULL (1<<5)