]> git.ipfire.org Git - thirdparty/openssl.git/blob - crypto/arm_arch.h
ARM assembler pack: add platform run-time detection.
[thirdparty/openssl.git] / crypto / arm_arch.h
1 #ifndef __ARM_ARCH_H__
2 #define __ARM_ARCH_H__
3
4 #if !defined(__ARM_ARCH__)
5 # if defined(__CC_ARM)
6 # define __ARM_ARCH__ __TARGET_ARCH_ARM
7 # if defined(__BIG_ENDIAN)
8 # define __ARMEB__
9 # else
10 # define __ARMEL__
11 # endif
12 # elif defined(__GNUC__)
13 /*
14 * Why doesn't gcc define __ARM_ARCH__? Instead it defines
15 * bunch of below macros. See all_architectires[] table in
16 * gcc/config/arm/arm.c. On a side note it defines
17 * __ARMEL__/__ARMEB__ for little-/big-endian.
18 */
19 # if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
20 defined(__ARM_ARCH_7R__)|| defined(__ARM_ARCH_7M__) || \
21 defined(__ARM_ARCH_7EM__)
22 # define __ARM_ARCH__ 7
23 # elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \
24 defined(__ARM_ARCH_6K__)|| defined(__ARM_ARCH_6M__) || \
25 defined(__ARM_ARCH_6Z__)|| defined(__ARM_ARCH_6ZK__) || \
26 defined(__ARM_ARCH_6T2__)
27 # define __ARM_ARCH__ 6
28 # elif defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || \
29 defined(__ARM_ARCH_5E__)|| defined(__ARM_ARCH_5TE__)
30 # define __ARM_ARCH__ 5
31 # elif defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__)
32 # define __ARM_ARCH__ 4
33 # else
34 # error "unsupported ARM architecture"
35 # endif
36 # endif
37
38 #ifdef OPENSSL_FIPSCANISTERBUILD
39 #include <openssl/fipssyms.h>
40 #endif
41
42 #if !__ASSEMBLER__
43 extern unsigned int OPENSSL_armcap_P;
44
45 #define ARMV7_NEON (1<<0)
46 #define ARMV7_TICK (1<<1)
47 #endif
48
49 #endif
50 #endif