32.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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_X86_32_H
  8. #define BOOST_PREDEF_ARCHITECTURE_X86_32_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /* tag::reference[]
  12. = `BOOST_ARCH_X86_32`
  13. http://en.wikipedia.org/wiki/X86[Intel x86] architecture:
  14. If available versions [3-6] are specifically detected.
  15. [options="header"]
  16. |===
  17. | {predef_symbol} | {predef_version}
  18. | `i386` | {predef_detection}
  19. | `+__i386__+` | {predef_detection}
  20. | `+__i486__+` | {predef_detection}
  21. | `+__i586__+` | {predef_detection}
  22. | `+__i686__+` | {predef_detection}
  23. | `+__i386+` | {predef_detection}
  24. | `+_M_IX86+` | {predef_detection}
  25. | `+_X86_+` | {predef_detection}
  26. | `+__THW_INTEL__+` | {predef_detection}
  27. | `+__I86__+` | {predef_detection}
  28. | `+__INTEL__+` | {predef_detection}
  29. | `+__I86__+` | V.0.0
  30. | `+_M_IX86+` | V.0.0
  31. | `+__i686__+` | 6.0.0
  32. | `+__i586__+` | 5.0.0
  33. | `+__i486__+` | 4.0.0
  34. | `+__i386__+` | 3.0.0
  35. |===
  36. */ // end::reference[]
  37. #define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER_NOT_AVAILABLE
  38. #if defined(i386) || defined(__i386__) || \
  39. defined(__i486__) || defined(__i586__) || \
  40. defined(__i686__) || defined(__i386) || \
  41. defined(_M_IX86) || defined(_X86_) || \
  42. defined(__THW_INTEL__) || defined(__I86__) || \
  43. defined(__INTEL__)
  44. # undef BOOST_ARCH_X86_32
  45. # if !defined(BOOST_ARCH_X86_32) && defined(__I86__)
  46. # define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(__I86__,0,0)
  47. # endif
  48. # if !defined(BOOST_ARCH_X86_32) && defined(_M_IX86)
  49. # define BOOST_ARCH_X86_32 BOOST_PREDEF_MAKE_10_VV00(_M_IX86)
  50. # endif
  51. # if !defined(BOOST_ARCH_X86_32) && defined(__i686__)
  52. # define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(6,0,0)
  53. # endif
  54. # if !defined(BOOST_ARCH_X86_32) && defined(__i586__)
  55. # define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(5,0,0)
  56. # endif
  57. # if !defined(BOOST_ARCH_X86_32) && defined(__i486__)
  58. # define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(4,0,0)
  59. # endif
  60. # if !defined(BOOST_ARCH_X86_32) && defined(__i386__)
  61. # define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(3,0,0)
  62. # endif
  63. # if !defined(BOOST_ARCH_X86_32)
  64. # define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER_AVAILABLE
  65. # endif
  66. #endif
  67. #if BOOST_ARCH_X86_32
  68. # define BOOST_ARCH_X86_32_AVAILABLE
  69. #endif
  70. #if BOOST_ARCH_X86_32
  71. # undef BOOST_ARCH_WORD_BITS_32
  72. # define BOOST_ARCH_WORD_BITS_32 BOOST_VERSION_NUMBER_AVAILABLE
  73. #endif
  74. #define BOOST_ARCH_X86_32_NAME "Intel x86-32"
  75. #include <boost/predef/architecture/x86.h>
  76. #endif
  77. #include <boost/predef/detail/test.h>
  78. BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86_32,BOOST_ARCH_X86_32_NAME)