ppc.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. | `+__powerpc64__+` | {predef_detection}
  20. | `+__POWERPC__+` | {predef_detection}
  21. | `+__ppc__+` | {predef_detection}
  22. | `+__ppc64__+` | {predef_detection}
  23. | `+__PPC__+` | {predef_detection}
  24. | `+__PPC64__+` | {predef_detection}
  25. | `+_M_PPC+` | {predef_detection}
  26. | `+_ARCH_PPC+` | {predef_detection}
  27. | `+_ARCH_PPC64+` | {predef_detection}
  28. | `+__PPCGECKO__+` | {predef_detection}
  29. | `+__PPCBROADWAY__+` | {predef_detection}
  30. | `+_XENON+` | {predef_detection}
  31. | `+__ppc+` | {predef_detection}
  32. | `+__ppc601__+` | 6.1.0
  33. | `+_ARCH_601+` | 6.1.0
  34. | `+__ppc603__+` | 6.3.0
  35. | `+_ARCH_603+` | 6.3.0
  36. | `+__ppc604__+` | 6.4.0
  37. | `+__ppc604__+` | 6.4.0
  38. |===
  39. */ // end::reference[]
  40. #define BOOST_ARCH_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE
  41. #if defined(__powerpc) || defined(__powerpc__) || defined(__powerpc64__) || \
  42. defined(__POWERPC__) || defined(__ppc__) || defined(__ppc64__) || \
  43. defined(__PPC__) || defined(__PPC64__) || \
  44. defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
  45. defined(__PPCGECKO__) || defined(__PPCBROADWAY__) || \
  46. defined(_XENON) || \
  47. defined(__ppc)
  48. # undef BOOST_ARCH_PPC
  49. # if !defined (BOOST_ARCH_PPC) && (defined(__ppc601__) || defined(_ARCH_601))
  50. # define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,1,0)
  51. # endif
  52. # if !defined (BOOST_ARCH_PPC) && (defined(__ppc603__) || defined(_ARCH_603))
  53. # define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,3,0)
  54. # endif
  55. # if !defined (BOOST_ARCH_PPC) && (defined(__ppc604__) || defined(__ppc604__))
  56. # define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,4,0)
  57. # endif
  58. # if !defined (BOOST_ARCH_PPC)
  59. # define BOOST_ARCH_PPC BOOST_VERSION_NUMBER_AVAILABLE
  60. # endif
  61. #endif
  62. #if BOOST_ARCH_PPC
  63. # define BOOST_ARCH_PPC_AVAILABLE
  64. #endif
  65. #define BOOST_ARCH_PPC_NAME "PowerPC"
  66. /* tag::reference[]
  67. = `BOOST_ARCH_PPC_64`
  68. http://en.wikipedia.org/wiki/PowerPC[PowerPC] 64 bit architecture.
  69. [options="header"]
  70. |===
  71. | {predef_symbol} | {predef_version}
  72. | `+__powerpc64__+` | {predef_detection}
  73. | `+__ppc64__+` | {predef_detection}
  74. | `+__PPC64__+` | {predef_detection}
  75. | `+_ARCH_PPC64+` | {predef_detection}
  76. |===
  77. */ // end::reference[]
  78. #define BOOST_ARCH_PPC_64 BOOST_VERSION_NUMBER_NOT_AVAILABLE
  79. #if defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) || \
  80. defined(_ARCH_PPC64)
  81. # undef BOOST_ARCH_PPC_64
  82. # define BOOST_ARCH_PPC_64 BOOST_VERSION_NUMBER_AVAILABLE
  83. #endif
  84. #if BOOST_ARCH_PPC_64
  85. # define BOOST_ARCH_PPC_64_AVAILABLE
  86. #endif
  87. #define BOOST_ARCH_PPC_64_NAME "PowerPC64"
  88. #if BOOST_ARCH_PPC_64
  89. # undef BOOST_ARCH_WORD_BITS_64
  90. # define BOOST_ARCH_WORD_BITS_64 BOOST_VERSION_NUMBER_AVAILABLE
  91. #else
  92. # undef BOOST_ARCH_WORD_BITS_32
  93. # define BOOST_ARCH_WORD_BITS_32 BOOST_VERSION_NUMBER_AVAILABLE
  94. #endif
  95. #endif
  96. #include <boost/predef/detail/test.h>
  97. BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PPC,BOOST_ARCH_PPC_NAME)
  98. #include <boost/predef/detail/test.h>
  99. BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PPC_64,BOOST_ARCH_PPC_64_NAME)