C89 MSVC doesn't support 'inline' - will have to make define for
[picodrive.git] / pico / arm_features.h
CommitLineData
d4d62665 1#ifndef __ARM_FEATURES_H__
2#define __ARM_FEATURES_H__
3
4#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
5 || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \
6 || defined(__ARM_ARCH_7EM__)
7
8#define HAVE_ARMV7
9#define HAVE_ARMV6
10#define HAVE_ARMV5
11
12#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
13 || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) \
14 || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__)
15
16#define HAVE_ARMV6
17#define HAVE_ARMV5
18
19#elif defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5E__) \
20 || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__)
21
22#define HAVE_ARMV5
23
24#endif
25
26/* no need for HAVE_NEON - GCC defines __ARM_NEON__ consistently */
27
28/* global function/external symbol */
29#ifndef __MACH__
30#define ESYM(name) name
31
32#define FUNCTION(name) \
33 .globl name; \
34 .type name, %function; \
35 name
36
37#define EXTRA_UNSAVED_REGS
38
39#else
40#define ESYM(name) _##name
41
42#define FUNCTION(name) \
43 .globl ESYM(name); \
44 name: \
45 ESYM(name)
46
47// r7 is preserved, but add it for EABI alignment..
48#define EXTRA_UNSAVED_REGS r7, r9,
49
50#endif
51
52#endif /* __ARM_FEATURES_H__ */