Brian Silverman | 44c68b1 | 2018-08-04 23:56:44 -0700 | [diff] [blame^] | 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 | /*` |
| 15 | [heading `BOOST_ARCH_MIPS`] |
| 16 | |
| 17 | [@http://en.wikipedia.org/wiki/MIPS_architecture MIPS] architecture. |
| 18 | |
| 19 | [table |
| 20 | [[__predef_symbol__] [__predef_version__]] |
| 21 | |
| 22 | [[`__mips__`] [__predef_detection__]] |
| 23 | [[`__mips`] [__predef_detection__]] |
| 24 | [[`__MIPS__`] [__predef_detection__]] |
| 25 | |
| 26 | [[`__mips`] [V.0.0]] |
| 27 | [[`_MIPS_ISA_MIPS1`] [1.0.0]] |
| 28 | [[`_R3000`] [1.0.0]] |
| 29 | [[`_MIPS_ISA_MIPS2`] [2.0.0]] |
| 30 | [[`__MIPS_ISA2__`] [2.0.0]] |
| 31 | [[`_R4000`] [2.0.0]] |
| 32 | [[`_MIPS_ISA_MIPS3`] [3.0.0]] |
| 33 | [[`__MIPS_ISA3__`] [3.0.0]] |
| 34 | [[`_MIPS_ISA_MIPS4`] [4.0.0]] |
| 35 | [[`__MIPS_ISA4__`] [4.0.0]] |
| 36 | ] |
| 37 | */ |
| 38 | |
| 39 | #define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER_NOT_AVAILABLE |
| 40 | |
| 41 | #if defined(__mips__) || defined(__mips) || \ |
| 42 | defined(__MIPS__) |
| 43 | # undef BOOST_ARCH_MIPS |
| 44 | # if !defined(BOOST_ARCH_MIPS) && (defined(__mips)) |
| 45 | # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(__mips,0,0) |
| 46 | # endif |
| 47 | # if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS1) || defined(_R3000)) |
| 48 | # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(1,0,0) |
| 49 | # endif |
| 50 | # if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS2) || defined(__MIPS_ISA2__) || defined(_R4000)) |
| 51 | # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(2,0,0) |
| 52 | # endif |
| 53 | # if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS3) || defined(__MIPS_ISA3__)) |
| 54 | # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(3,0,0) |
| 55 | # endif |
| 56 | # if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS4) || defined(__MIPS_ISA4__)) |
| 57 | # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(4,0,0) |
| 58 | # endif |
| 59 | # if !defined(BOOST_ARCH_MIPS) |
| 60 | # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER_AVAILABLE |
| 61 | # endif |
| 62 | #endif |
| 63 | |
| 64 | #if BOOST_ARCH_MIPS |
| 65 | # define BOOST_ARCH_MIPS_AVAILABLE |
| 66 | #endif |
| 67 | |
| 68 | #define BOOST_ARCH_MIPS_NAME "MIPS" |
| 69 | |
| 70 | #endif |
| 71 | |
| 72 | #include <boost/predef/detail/test.h> |
| 73 | BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_MIPS,BOOST_ARCH_MIPS_NAME) |