mips.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. #ifndef BOOST_PREDEF_ARCHITECTURE_MIPS_H
  8. #define BOOST_PREDEF_ARCHITECTURE_MIPS_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /*`
  12. [heading `BOOST_ARCH_MIPS`]
  13. [@http://en.wikipedia.org/wiki/MIPS_architecture MIPS] architecture.
  14. [table
  15. [[__predef_symbol__] [__predef_version__]]
  16. [[`__mips__`] [__predef_detection__]]
  17. [[`__mips`] [__predef_detection__]]
  18. [[`__MIPS__`] [__predef_detection__]]
  19. [[`__mips`] [V.0.0]]
  20. [[`_MIPS_ISA_MIPS1`] [1.0.0]]
  21. [[`_R3000`] [1.0.0]]
  22. [[`_MIPS_ISA_MIPS2`] [2.0.0]]
  23. [[`__MIPS_ISA2__`] [2.0.0]]
  24. [[`_R4000`] [2.0.0]]
  25. [[`_MIPS_ISA_MIPS3`] [3.0.0]]
  26. [[`__MIPS_ISA3__`] [3.0.0]]
  27. [[`_MIPS_ISA_MIPS4`] [4.0.0]]
  28. [[`__MIPS_ISA4__`] [4.0.0]]
  29. ]
  30. */
  31. #define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER_NOT_AVAILABLE
  32. #if defined(__mips__) || defined(__mips) || \
  33. defined(__MIPS__)
  34. # undef BOOST_ARCH_MIPS
  35. # if !defined(BOOST_ARCH_MIPS) && (defined(__mips))
  36. # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(__mips,0,0)
  37. # endif
  38. # if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS1) || defined(_R3000))
  39. # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(1,0,0)
  40. # endif
  41. # if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS2) || defined(__MIPS_ISA2__) || defined(_R4000))
  42. # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(2,0,0)
  43. # endif
  44. # if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS3) || defined(__MIPS_ISA3__))
  45. # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(3,0,0)
  46. # endif
  47. # if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS4) || defined(__MIPS_ISA4__))
  48. # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(4,0,0)
  49. # endif
  50. # if !defined(BOOST_ARCH_MIPS)
  51. # define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER_AVAILABLE
  52. # endif
  53. #endif
  54. #if BOOST_ARCH_MIPS
  55. # define BOOST_ARCH_MIPS_AVAILABLE
  56. #endif
  57. #define BOOST_ARCH_MIPS_NAME "MIPS"
  58. #endif
  59. #include <boost/predef/detail/test.h>
  60. BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_MIPS,BOOST_ARCH_MIPS_NAME)