ppc.h 2.0 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_PPC_H
  8. #define BOOST_PREDEF_ARCHITECTURE_PPC_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /* tag::reference[]
  12. = `BOOST_ARCH_PPC`
  13. http://en.wikipedia.org/wiki/PowerPC[PowerPC] architecture.
  14. [options="header"]
  15. |===
  16. | {predef_symbol} | {predef_version}
  17. | `+__powerpc+` | {predef_detection}
  18. | `+__powerpc__+` | {predef_detection}
  19. | `+__POWERPC__+` | {predef_detection}
  20. | `+__ppc__+` | {predef_detection}
  21. | `+_M_PPC+` | {predef_detection}
  22. | `+_ARCH_PPC+` | {predef_detection}
  23. | `+__PPCGECKO__+` | {predef_detection}
  24. | `+__PPCBROADWAY__+` | {predef_detection}
  25. | `+_XENON+` | {predef_detection}
  26. | `+__ppc601__+` | 6.1.0
  27. | `+_ARCH_601+` | 6.1.0
  28. | `+__ppc603__+` | 6.3.0
  29. | `+_ARCH_603+` | 6.3.0
  30. | `+__ppc604__+` | 6.4.0
  31. | `+__ppc604__+` | 6.4.0
  32. |===
  33. */ // end::reference[]
  34. #define BOOST_ARCH_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE
  35. #if defined(__powerpc) || defined(__powerpc__) || \
  36. defined(__POWERPC__) || defined(__ppc__) || \
  37. defined(_M_PPC) || defined(_ARCH_PPC) || \
  38. defined(__PPCGECKO__) || defined(__PPCBROADWAY__) || \
  39. defined(_XENON)
  40. # undef BOOST_ARCH_PPC
  41. # if !defined (BOOST_ARCH_PPC) && (defined(__ppc601__) || defined(_ARCH_601))
  42. # define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,1,0)
  43. # endif
  44. # if !defined (BOOST_ARCH_PPC) && (defined(__ppc603__) || defined(_ARCH_603))
  45. # define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,3,0)
  46. # endif
  47. # if !defined (BOOST_ARCH_PPC) && (defined(__ppc604__) || defined(__ppc604__))
  48. # define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,4,0)
  49. # endif
  50. # if !defined (BOOST_ARCH_PPC)
  51. # define BOOST_ARCH_PPC BOOST_VERSION_NUMBER_AVAILABLE
  52. # endif
  53. #endif
  54. #if BOOST_ARCH_PPC
  55. # define BOOST_ARCH_PPC_AVAILABLE
  56. #endif
  57. #define BOOST_ARCH_PPC_NAME "PowerPC"
  58. #endif
  59. #include <boost/predef/detail/test.h>
  60. BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PPC,BOOST_ARCH_PPC_NAME)