superh.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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_SUPERH_H
  8. #define BOOST_PREDEF_ARCHITECTURE_SUPERH_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /*`
  12. [heading `BOOST_ARCH_SH`]
  13. [@http://en.wikipedia.org/wiki/SuperH SuperH] architecture:
  14. If available versions \[1-5\] are specifically detected.
  15. [table
  16. [[__predef_symbol__] [__predef_version__]]
  17. [[`__sh__`] [__predef_detection__]]
  18. [[`__SH5__`] [5.0.0]]
  19. [[`__SH4__`] [4.0.0]]
  20. [[`__sh3__`] [3.0.0]]
  21. [[`__SH3__`] [3.0.0]]
  22. [[`__sh2__`] [2.0.0]]
  23. [[`__sh1__`] [1.0.0]]
  24. ]
  25. */
  26. #define BOOST_ARCH_SH BOOST_VERSION_NUMBER_NOT_AVAILABLE
  27. #if defined(__sh__)
  28. # undef BOOST_ARCH_SH
  29. # if !defined(BOOST_ARCH_SH) && (defined(__SH5__))
  30. # define BOOST_ARCH_SH BOOST_VERSION_NUMBER(5,0,0)
  31. # endif
  32. # if !defined(BOOST_ARCH_SH) && (defined(__SH4__))
  33. # define BOOST_ARCH_SH BOOST_VERSION_NUMBER(4,0,0)
  34. # endif
  35. # if !defined(BOOST_ARCH_SH) && (defined(__sh3__) || defined(__SH3__))
  36. # define BOOST_ARCH_SH BOOST_VERSION_NUMBER(3,0,0)
  37. # endif
  38. # if !defined(BOOST_ARCH_SH) && (defined(__sh2__))
  39. # define BOOST_ARCH_SH BOOST_VERSION_NUMBER(2,0,0)
  40. # endif
  41. # if !defined(BOOST_ARCH_SH) && (defined(__sh1__))
  42. # define BOOST_ARCH_SH BOOST_VERSION_NUMBER(1,0,0)
  43. # endif
  44. # if !defined(BOOST_ARCH_SH)
  45. # define BOOST_ARCH_SH BOOST_VERSION_NUMBER_AVAILABLE
  46. # endif
  47. #endif
  48. #if BOOST_ARCH_SH
  49. # define BOOST_ARCH_SH_AVAILABLE
  50. #endif
  51. #define BOOST_ARCH_SH_NAME "SuperH"
  52. #endif
  53. #include <boost/predef/detail/test.h>
  54. BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SH,BOOST_ARCH_SH_NAME)