1 | /* |
2 | Copyright Rene Rivera 2008-2015 |
3 | Distributed under the Boost Software License, Version 1.0. |
4 | (See accompanying file LICENSE_1_0.txt or copy at |
5 | http://www.boost.org/LICENSE_1_0.txt) |
6 | */ |
7 | |
8 | #ifndef BOOST_PREDEF_ARCHITECTURE_MIPS_H |
9 | #define BOOST_PREDEF_ARCHITECTURE_MIPS_H |
10 | |
11 | #include <boost/predef/version_number.h> |
12 | #include <boost/predef/make.h> |
13 | |
14 | /* tag::reference[] |
15 | = `BOOST_ARCH_MIPS` |
16 | |
17 | http://en.wikipedia.org/wiki/MIPS_architecture[MIPS] architecture. |
18 | |
19 | [options="header"] |
20 | |=== |
21 | | {predef_symbol} | {predef_version} |
22 | |
23 | | `+__mips__+` | {predef_detection} |
24 | | `+__mips+` | {predef_detection} |
25 | | `+__MIPS__+` | {predef_detection} |
26 | |
27 | | `+__mips+` | V.0.0 |
28 | | `+_MIPS_ISA_MIPS1+` | 1.0.0 |
29 | | `+_R3000+` | 1.0.0 |
30 | | `+_MIPS_ISA_MIPS2+` | 2.0.0 |
31 | | `+__MIPS_ISA2__+` | 2.0.0 |
32 | | `+_R4000+` | 2.0.0 |
33 | | `+_MIPS_ISA_MIPS3+` | 3.0.0 |
34 | | `+__MIPS_ISA3__+` | 3.0.0 |
35 | | `+_MIPS_ISA_MIPS4+` | 4.0.0 |
36 | | `+__MIPS_ISA4__+` | 4.0.0 |
37 | |=== |
38 | */ // end::reference[] |
39 | |
40 | #define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER_NOT_AVAILABLE |
41 | |
42 | #if defined(__mips__) || defined(__mips) || \ |
43 | defined(__MIPS__) |
44 | # undef BOOST_ARCH_MIPS |
45 | # if !defined(BOOST_ARCH_MIPS) && (defined(__mips)) |
46 | # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(__mips,0,0) |
47 | # endif |
48 | # if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS1) || defined(_R3000)) |
49 | # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(1,0,0) |
50 | # endif |
51 | # if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS2) || defined(__MIPS_ISA2__) || defined(_R4000)) |
52 | # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(2,0,0) |
53 | # endif |
54 | # if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS3) || defined(__MIPS_ISA3__)) |
55 | # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(3,0,0) |
56 | # endif |
57 | # if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS4) || defined(__MIPS_ISA4__)) |
58 | # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(4,0,0) |
59 | # endif |
60 | # if !defined(BOOST_ARCH_MIPS) |
61 | # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER_AVAILABLE |
62 | # endif |
63 | #endif |
64 | |
65 | #if BOOST_ARCH_MIPS |
66 | # define BOOST_ARCH_MIPS_AVAILABLE |
67 | #endif |
68 | |
69 | #define BOOST_ARCH_MIPS_NAME "MIPS" |
70 | |
71 | #endif |
72 | |
73 | #include <boost/predef/detail/test.h> |
74 | BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_MIPS,BOOST_ARCH_MIPS_NAME) |
75 | |