sparc.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_SPARC_H
  8. #define BOOST_PREDEF_ARCHITECTURE_SPARC_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /* tag::reference[]
  12. = `BOOST_ARCH_SPARC`
  13. http://en.wikipedia.org/wiki/SPARC[SPARC] architecture.
  14. [options="header"]
  15. |===
  16. | {predef_symbol} | {predef_version}
  17. | `+__sparc__+` | {predef_detection}
  18. | `+__sparc+` | {predef_detection}
  19. | `+__sparcv9+` | 9.0.0
  20. | `+__sparc_v9__+` | 9.0.0
  21. | `+__sparcv8+` | 8.0.0
  22. | `+__sparc_v8__+` | 8.0.0
  23. |===
  24. */ // end::reference[]
  25. #define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER_NOT_AVAILABLE
  26. #if defined(__sparc__) || defined(__sparc)
  27. # undef BOOST_ARCH_SPARC
  28. # if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv9) || defined(__sparc_v9__)
  29. # define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(9,0,0)
  30. # endif
  31. # if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv8) || defined(__sparc_v8__)
  32. # define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(8,0,0)
  33. # endif
  34. # if !defined(BOOST_ARCH_SPARC)
  35. # define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER_AVAILABLE
  36. # endif
  37. #endif
  38. #if BOOST_ARCH_SPARC
  39. # define BOOST_ARCH_SPARC_AVAILABLE
  40. #endif
  41. #if BOOST_ARCH_SPARC
  42. # if BOOST_ARCH_SPARC >= BOOST_VERSION_NUMBER(9,0,0)
  43. # undef BOOST_ARCH_WORD_BITS_64
  44. # define BOOST_ARCH_WORD_BITS_64 BOOST_VERSION_NUMBER_AVAILABLE
  45. # else
  46. # undef BOOST_ARCH_WORD_BITS_32
  47. # define BOOST_ARCH_WORD_BITS_32 BOOST_VERSION_NUMBER_AVAILABLE
  48. # endif
  49. #endif
  50. #define BOOST_ARCH_SPARC_NAME "SPARC"
  51. #endif
  52. #include <boost/predef/detail/test.h>
  53. BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SPARC,BOOST_ARCH_SPARC_NAME)