1 #ifndef __ARM_FEATURES_H__
2 #define __ARM_FEATURES_H__
4 /* note: features only available since:
5 * __ARM_ARCH gcc 4.8/clang 3.2
6 * ARMv8 support gcc 4.8/clang 3.4
7 * ARM64 support gcc 4.8/clang 3.5
10 #if defined(__aarch64__)
12 #elif (defined(__ARM_ARCH) && __ARM_ARCH >= 8)
19 #elif (defined(__ARM_ARCH) && __ARM_ARCH >= 7) \
20 || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
21 || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \
22 || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7S__)
28 #elif (defined(__ARM_ARCH) && __ARM_ARCH >= 6) \
29 || defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
30 || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) \
31 || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) \
32 || defined(__ARM_ARCH_6M__)
36 #define HAVE_PRE_ARMV7
38 #elif defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5E__) \
39 || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__)
42 #define HAVE_PRE_ARMV7
44 #elif defined(__arm__)
46 #define HAVE_PRE_ARMV7
50 /* no need for HAVE_NEON - GCC defines __ARM_NEON__ consistently */
52 /* global function/external symbol */
54 #define ESYM(name) name
56 #define FUNCTION(name) \
58 .type name, %function; \
61 #define EXTRA_UNSAVED_REGS
64 #define ESYM(name) _##name
66 #define FUNCTION(name) \
71 // r7 is preserved, but add it for EABI alignment..
72 #define EXTRA_UNSAVED_REGS r7, r9,
76 #if defined(__MACH__) || defined(__PIC__)
77 #define TEXRELS_FORBIDDEN
80 #endif /* __ARM_FEATURES_H__ */