arm.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /*
  2. Copyright Rene Rivera 2008-2019
  3. Copyright Franz Detro 2014
  4. Copyright (c) Microsoft Corporation 2014
  5. Distributed under the Boost Software License, Version 1.0.
  6. (See accompanying file LICENSE_1_0.txt or copy at
  7. http://www.boost.org/LICENSE_1_0.txt)
  8. */
  9. #ifndef BOOST_PREDEF_ARCHITECTURE_ARM_H
  10. #define BOOST_PREDEF_ARCHITECTURE_ARM_H
  11. #include <boost/predef/version_number.h>
  12. #include <boost/predef/make.h>
  13. /* tag::reference[]
  14. = `BOOST_ARCH_ARM`
  15. http://en.wikipedia.org/wiki/ARM_architecture[ARM] architecture.
  16. [options="header"]
  17. |===
  18. | {predef_symbol} | {predef_version}
  19. | `+__ARM_ARCH+` | {predef_detection}
  20. | `+__TARGET_ARCH_ARM+` | {predef_detection}
  21. | `+__TARGET_ARCH_THUMB+` | {predef_detection}
  22. | `+_M_ARM+` | {predef_detection}
  23. | `+__arm__+` | {predef_detection}
  24. | `+__arm64+` | {predef_detection}
  25. | `+__thumb__+` | {predef_detection}
  26. | `+_M_ARM64+` | {predef_detection}
  27. | `+__aarch64__+` | {predef_detection}
  28. | `+__AARCH64EL__+` | {predef_detection}
  29. | `+__ARM_ARCH_7__+` | {predef_detection}
  30. | `+__ARM_ARCH_7A__+` | {predef_detection}
  31. | `+__ARM_ARCH_7R__+` | {predef_detection}
  32. | `+__ARM_ARCH_7M__+` | {predef_detection}
  33. | `+__ARM_ARCH_6K__+` | {predef_detection}
  34. | `+__ARM_ARCH_6Z__+` | {predef_detection}
  35. | `+__ARM_ARCH_6KZ__+` | {predef_detection}
  36. | `+__ARM_ARCH_6T2__+` | {predef_detection}
  37. | `+__ARM_ARCH_5TE__+` | {predef_detection}
  38. | `+__ARM_ARCH_5TEJ__+` | {predef_detection}
  39. | `+__ARM_ARCH_4T__+` | {predef_detection}
  40. | `+__ARM_ARCH_4__+` | {predef_detection}
  41. | `+__ARM_ARCH+` | V.0.0
  42. | `+__TARGET_ARCH_ARM+` | V.0.0
  43. | `+__TARGET_ARCH_THUMB+` | V.0.0
  44. | `+_M_ARM+` | V.0.0
  45. | `+__arm64+` | 8.0.0
  46. | `+_M_ARM64+` | 8.0.0
  47. | `+__aarch64__+` | 8.0.0
  48. | `+__AARCH64EL__+` | 8.0.0
  49. | `+__ARM_ARCH_7__+` | 7.0.0
  50. | `+__ARM_ARCH_7A__+` | 7.0.0
  51. | `+__ARM_ARCH_7R__+` | 7.0.0
  52. | `+__ARM_ARCH_7M__+` | 7.0.0
  53. | `+__ARM_ARCH_6K__+` | 6.0.0
  54. | `+__ARM_ARCH_6Z__+` | 6.0.0
  55. | `+__ARM_ARCH_6KZ__+` | 6.0.0
  56. | `+__ARM_ARCH_6T2__+` | 6.0.0
  57. | `+__ARM_ARCH_5TE__+` | 5.0.0
  58. | `+__ARM_ARCH_5TEJ__+` | 5.0.0
  59. | `+__ARM_ARCH_4T__+` | 4.0.0
  60. | `+__ARM_ARCH_4__+` | 4.0.0
  61. |===
  62. */ // end::reference[]
  63. #define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
  64. #if \
  65. defined(__ARM_ARCH) || defined(__TARGET_ARCH_ARM) || \
  66. defined(__TARGET_ARCH_THUMB) || defined(_M_ARM) || \
  67. defined(__arm__) || defined(__arm64) || defined(__thumb__) || \
  68. defined(_M_ARM64) || defined(__aarch64__) || defined(__AARCH64EL__) || \
  69. defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
  70. defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || \
  71. defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \
  72. defined(__ARM_ARCH_6KZ__) || defined(__ARM_ARCH_6T2__) || \
  73. defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__) || \
  74. defined(__ARM_ARCH_4T__) || defined(__ARM_ARCH_4__)
  75. # undef BOOST_ARCH_ARM
  76. # if !defined(BOOST_ARCH_ARM) && defined(__ARM_ARCH)
  77. # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__ARM_ARCH,0,0)
  78. # endif
  79. # if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_ARM)
  80. # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_ARM,0,0)
  81. # endif
  82. # if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_THUMB)
  83. # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_THUMB,0,0)
  84. # endif
  85. # if !defined(BOOST_ARCH_ARM) && defined(_M_ARM)
  86. # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(_M_ARM,0,0)
  87. # endif
  88. # if !defined(BOOST_ARCH_ARM) && ( \
  89. defined(__arm64) || defined(_M_ARM64) || defined(__aarch64__) || \
  90. defined(__AARCH64EL__) )
  91. # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0)
  92. # endif
  93. # if !defined(BOOST_ARCH_ARM) && ( \
  94. defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
  95. defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) )
  96. # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(7,0,0)
  97. # endif
  98. # if !defined(BOOST_ARCH_ARM) && ( \
  99. defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \
  100. defined(__ARM_ARCH_6KZ__) || defined(__ARM_ARCH_6T2__) )
  101. # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(6,0,0)
  102. # endif
  103. # if !defined(BOOST_ARCH_ARM) && ( \
  104. defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__) )
  105. # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(5,0,0)
  106. # endif
  107. # if !defined(BOOST_ARCH_ARM) && ( \
  108. defined(__ARM_ARCH_4T__) || defined(__ARM_ARCH_4__) )
  109. # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(4,0,0)
  110. # endif
  111. # if !defined(BOOST_ARCH_ARM)
  112. # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_AVAILABLE
  113. # endif
  114. #endif
  115. #if BOOST_ARCH_ARM
  116. # define BOOST_ARCH_ARM_AVAILABLE
  117. #endif
  118. #if BOOST_ARCH_ARM
  119. # if BOOST_ARCH_ARM >= BOOST_VERSION_NUMBER(8,0,0)
  120. # undef BOOST_ARCH_WORD_BITS_64
  121. # define BOOST_ARCH_WORD_BITS_64 BOOST_VERSION_NUMBER_AVAILABLE
  122. # else
  123. # undef BOOST_ARCH_WORD_BITS_32
  124. # define BOOST_ARCH_WORD_BITS_32 BOOST_VERSION_NUMBER_AVAILABLE
  125. # endif
  126. #endif
  127. #define BOOST_ARCH_ARM_NAME "ARM"
  128. #endif
  129. #include <boost/predef/detail/test.h>
  130. BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_ARM,BOOST_ARCH_ARM_NAME)