m68k.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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_M68K_H
  8. #define BOOST_PREDEF_ARCHITECTURE_M68K_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /* tag::reference[]
  12. = `BOOST_ARCH_M68K`
  13. http://en.wikipedia.org/wiki/M68k[Motorola 68k] architecture.
  14. [options="header"]
  15. |===
  16. | {predef_symbol} | {predef_version}
  17. | `+__m68k__+` | {predef_detection}
  18. | `M68000` | {predef_detection}
  19. | `+__mc68060__+` | 6.0.0
  20. | `mc68060` | 6.0.0
  21. | `+__mc68060+` | 6.0.0
  22. | `+__mc68040__+` | 4.0.0
  23. | `mc68040` | 4.0.0
  24. | `+__mc68040+` | 4.0.0
  25. | `+__mc68030__+` | 3.0.0
  26. | `mc68030` | 3.0.0
  27. | `+__mc68030+` | 3.0.0
  28. | `+__mc68020__+` | 2.0.0
  29. | `mc68020` | 2.0.0
  30. | `+__mc68020+` | 2.0.0
  31. | `+__mc68010__+` | 1.0.0
  32. | `mc68010` | 1.0.0
  33. | `+__mc68010+` | 1.0.0
  34. | `+__mc68000__+` | 0.0.1
  35. | `mc68000` | 0.0.1
  36. | `+__mc68000+` | 0.0.1
  37. |===
  38. */ // end::reference[]
  39. #define BOOST_ARCH_M68K BOOST_VERSION_NUMBER_NOT_AVAILABLE
  40. #if defined(__m68k__) || defined(M68000)
  41. # undef BOOST_ARCH_M68K
  42. # if !defined(BOOST_ARCH_M68K) && (defined(__mc68060__) || defined(mc68060) || defined(__mc68060))
  43. # define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(6,0,0)
  44. # endif
  45. # if !defined(BOOST_ARCH_M68K) && (defined(__mc68040__) || defined(mc68040) || defined(__mc68040))
  46. # define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(4,0,0)
  47. # endif
  48. # if !defined(BOOST_ARCH_M68K) && (defined(__mc68030__) || defined(mc68030) || defined(__mc68030))
  49. # define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(3,0,0)
  50. # endif
  51. # if !defined(BOOST_ARCH_M68K) && (defined(__mc68020__) || defined(mc68020) || defined(__mc68020))
  52. # define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(2,0,0)
  53. # endif
  54. # if !defined(BOOST_ARCH_M68K) && (defined(__mc68010__) || defined(mc68010) || defined(__mc68010))
  55. # define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(1,0,0)
  56. # endif
  57. # if !defined(BOOST_ARCH_M68K) && (defined(__mc68000__) || defined(mc68000) || defined(__mc68000))
  58. # define BOOST_ARCH_M68K BOOST_VERSION_NUMBER_AVAILABLE
  59. # endif
  60. # if !defined(BOOST_ARCH_M68K)
  61. # define BOOST_ARCH_M68K BOOST_VERSION_NUMBER_AVAILABLE
  62. # endif
  63. #endif
  64. #if BOOST_ARCH_M68K
  65. # define BOOST_ARCH_M68K_AVAILABLE
  66. #endif
  67. #if BOOST_ARCH_M68K
  68. # undef BOOST_ARCH_WORD_BITS_32
  69. # define BOOST_ARCH_WORD_BITS_32 BOOST_VERSION_NUMBER_AVAILABLE
  70. #endif
  71. #define BOOST_ARCH_M68K_NAME "Motorola 68k"
  72. #endif
  73. #include <boost/predef/detail/test.h>
  74. BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_M68K,BOOST_ARCH_M68K_NAME)