blob: e5ddd66aab125637e95adbeb620d15f5e8221f75 [file] [log] [blame]
Travis Geiselbrecht1d0df692008-09-01 02:26:09 -07001/*
2 * Copyright (c) 2008 Travis Geiselbrecht
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files
6 * (the "Software"), to deal in the Software without restriction,
7 * including without limitation the rights to use, copy, modify, merge,
8 * publish, distribute, sublicense, and/or sell copies of the Software,
9 * and to permit persons to whom the Software is furnished to do so,
10 * subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be
13 * included in all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */
23#ifndef __ARM_CORES_H
24#define __ARM_CORES_H
25
26/*
27 * make the gcc built in define a little easier to deal with
28 * to decide what core it is generating code for
29 *
30 * ARM_ARCH_LEVEL gets assigned a numeric value of the general family
31 *
32 * ARM_ARCH_* gets defined for each feature recursively
33 */
34
35#if defined(__ARM_ARCH_7M__)
36#define ARM_ARCH_7M 1
37#endif
38#if defined(__ARM_ARCH_7R__)
39#define ARM_ARCH_7R 1
40#endif
41#if defined(__ARM_ARCH_7A__) || defined(ARM_ARCH_7R)
42#define ARM_ARCH_7A 1
43#endif
44#if defined(__ARM_ARCH_7__) || defined(ARM_ARCH_7A) || defined(ARM_ARCH_7M)
45#define ARM_ARCH_7 1
46#ifndef ARM_ARCH_LEVEL
47#define ARM_ARCH_LEVEL 7
48#endif
49#endif
50
51#if defined(__ARM_ARCH_6M__)
52#define ARM_ARCH_6M 1
53#endif
54#if defined(__ARM_ARCH_6T2__) || defined(ARM_ARCH_7)
55#define ARM_ARCH_6T2 1
56#endif
57#if defined(__ARM_ARCH_6ZK__)
58#define ARM_ARCH_6ZK 1
59#endif
60#if defined(__ARM_ARCH_6Z__) || defined(ARM_ARCH_6ZK)
61#define ARM_ARCH_6Z 1
62#endif
63#if defined(__ARM_ARCH_6K__) || defined(ARM_ARCH_6ZK) || defined(ARM_ARCH_7)
64#define ARM_ARCH_6K 1
65#endif
66#if defined(__ARM_ARCH_6J__)
67#define ARM_ARCH_6J 1
68#endif
69#if defined(__ARM_ARCH_6__) || defined(ARM_ARCH_6J) || defined(ARM_ARCH_6K) || defined(ARM_ARCH_6Z) || defined(ARM_ARCH_6T2) || defined(ARM_ARCH_6M)
70#define ARM_ARCH_6 1
71#ifndef ARM_ARCH_LEVEL
72#define ARM_ARCH_LEVEL 6
73#endif
74#endif
75
76#if defined(__ARM_ARCH_5TEJ__)
77#define ARM_ARCH_5TEJ 1
78#endif
79#if defined(__ARM_ARCH_5TE__) || defined(ARM_ARCH_5TEJ) || defined(ARM_ARCH_6)
80#define ARM_ARCH_5TE 1
81#endif
82#if defined(__ARM_ARCH_5E__) || defined(ARM_ARCH_5TE)
83#define ARM_ARCH_5E 1
84#endif
85#if defined(__ARM_ARCH_5T__) || defined(ARM_ARCH_5TE)
86#define ARM_ARCH_5T 1
87#endif
88#if defined(__ARM_ARCH_5__) || defined(ARM_ARCH_5E) || defined(ARM_ARCH_5T)
89#define ARM_ARCH_5 1
90#ifndef ARM_ARCH_LEVEL
91#define ARM_ARCH_LEVEL 5
92#endif
93#endif
94
95#if defined(__ARM_ARCH_4T__) || defined(ARM_ARCH_5T)
96#define ARM_ARCH_4T 1
97#endif
98#if defined(__ARM_ARCH_4__) || defined(ARM_ARCH_4T) || defined(ARM_ARCH_5)
99#define ARM_ARCH_4 1
100#ifndef ARM_ARCH_LEVEL
101#define ARM_ARCH_LEVEL 4
102#endif
103#endif
104
105#if 0
106/* test */
107#if ARM_ARCH_LEVEL >= 7
108#warning ARM_ARCH_LEVEL >= 7
109#endif
110#if ARM_ARCH_LEVEL >= 6
111#warning ARM_ARCH_LEVEL >= 6
112#endif
113#if ARM_ARCH_LEVEL >= 5
114#warning ARM_ARCH_LEVEL >= 5
115#endif
116#if ARM_ARCH_LEVEL >= 4
117#warning ARM_ARCH_LEVEL >= 4
118#endif
119#endif
120
121#endif
122