arm.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. Copyright Rene Rivera 2008-2015
  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 MSGPACK_PREDEF_ARCHITECTURE_ARM_H
  10. #define MSGPACK_PREDEF_ARCHITECTURE_ARM_H
  11. #include <msgpack/predef/version_number.h>
  12. #include <msgpack/predef/make.h>
  13. /*`
  14. [heading `MSGPACK_ARCH_ARM`]
  15. [@http://en.wikipedia.org/wiki/ARM_architecture ARM] architecture.
  16. [table
  17. [[__predef_symbol__] [__predef_version__]]
  18. [[`__arm__`] [__predef_detection__]]
  19. [[`__arm64`] [__predef_detection__]]
  20. [[`__thumb__`] [__predef_detection__]]
  21. [[`__TARGET_ARCH_ARM`] [__predef_detection__]]
  22. [[`__TARGET_ARCH_THUMB`] [__predef_detection__]]
  23. [[`_M_ARM`] [__predef_detection__]]
  24. [[`_M_ARM64`] [__predef_detection__]]
  25. [[`__arm64`] [8.0.0]]
  26. [[`__TARGET_ARCH_ARM`] [V.0.0]]
  27. [[`__TARGET_ARCH_THUMB`] [V.0.0]]
  28. [[`__ARM_ARCH`] [V.0.0]]
  29. [[`_M_ARM`] [V.0.0]]
  30. [[`_M_ARM64`] [8.0.0]]
  31. ]
  32. */
  33. #define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
  34. #if defined(__arm__) || defined(__arm64) || defined(__thumb__) || \
  35. defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || \
  36. defined(__ARM_ARCH) || \
  37. defined(_M_ARM) || defined(_M_ARM64)
  38. # undef MSGPACK_ARCH_ARM
  39. # if !defined(MSGPACK_ARCH_ARM) && defined(__arm64)
  40. # define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(8,0,0)
  41. # endif
  42. # if !defined(MSGPACK_ARCH_ARM) && defined(__TARGET_ARCH_ARM)
  43. # define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(__TARGET_ARCH_ARM,0,0)
  44. # endif
  45. # if !defined(MSGPACK_ARCH_ARM) && defined(__TARGET_ARCH_THUMB)
  46. # define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(__TARGET_ARCH_THUMB,0,0)
  47. # endif
  48. # if !defined(MSGPACK_ARCH_ARM) && defined(__ARM_ARCH)
  49. # define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(__ARM_ARCH,0,0)
  50. # endif
  51. # if !defined(MSGPACK_ARCH_ARM) && defined(_M_ARM64)
  52. # define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(8,0,0)
  53. # endif
  54. # if !defined(MSGPACK_ARCH_ARM) && defined(_M_ARM)
  55. # define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(_M_ARM,0,0)
  56. # endif
  57. # if !defined(MSGPACK_ARCH_ARM)
  58. # define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER_AVAILABLE
  59. # endif
  60. #endif
  61. #if MSGPACK_ARCH_ARM
  62. # define MSGPACK_ARCH_ARM_AVAILABLE
  63. #endif
  64. #define MSGPACK_ARCH_ARM_NAME "ARM"
  65. #endif
  66. #include <msgpack/predef/detail/test.h>
  67. MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_ARM,MSGPACK_ARCH_ARM_NAME)