caps_arch_gcc_aarch32.hpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Distributed under the Boost Software License, Version 1.0.
  3. * (See accompanying file LICENSE_1_0.txt or copy at
  4. * http://www.boost.org/LICENSE_1_0.txt)
  5. *
  6. * Copyright (c) 2020, 2022 Andrey Semashev
  7. */
  8. /*!
  9. * \file atomic/detail/caps_arch_gcc_aarch32.hpp
  10. *
  11. * This header defines feature capabilities macros
  12. */
  13. #ifndef BOOST_ATOMIC_DETAIL_CAPS_ARCH_GCC_AARCH32_HPP_INCLUDED_
  14. #define BOOST_ATOMIC_DETAIL_CAPS_ARCH_GCC_AARCH32_HPP_INCLUDED_
  15. #include <boost/atomic/detail/config.hpp>
  16. #ifdef BOOST_HAS_PRAGMA_ONCE
  17. #pragma once
  18. #endif
  19. #if defined(__ARMEL__) || \
  20. (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || \
  21. (defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \
  22. defined(BOOST_WINDOWS)
  23. #define BOOST_ATOMIC_DETAIL_AARCH32_LITTLE_ENDIAN
  24. #elif defined(__ARMEB__) || \
  25. defined(__ARM_BIG_ENDIAN) || \
  26. (defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) || \
  27. (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__))
  28. #define BOOST_ATOMIC_DETAIL_AARCH32_BIG_ENDIAN
  29. #else
  30. #include <boost/predef/other/endian.h>
  31. #if BOOST_ENDIAN_LITTLE_BYTE
  32. #define BOOST_ATOMIC_DETAIL_AARCH32_LITTLE_ENDIAN
  33. #elif BOOST_ENDIAN_BIG_BYTE
  34. #define BOOST_ATOMIC_DETAIL_AARCH32_BIG_ENDIAN
  35. #else
  36. #error "Boost.Atomic: Failed to determine AArch32 endianness, the target platform is not supported. Please, report to the developers (patches are welcome)."
  37. #endif
  38. #endif
  39. #define BOOST_ATOMIC_INT8_LOCK_FREE 2
  40. #define BOOST_ATOMIC_INT16_LOCK_FREE 2
  41. #define BOOST_ATOMIC_INT32_LOCK_FREE 2
  42. #define BOOST_ATOMIC_INT64_LOCK_FREE 2
  43. #define BOOST_ATOMIC_POINTER_LOCK_FREE 2
  44. #define BOOST_ATOMIC_THREAD_FENCE 2
  45. #define BOOST_ATOMIC_SIGNAL_FENCE 2
  46. #endif // BOOST_ATOMIC_DETAIL_CAPS_ARCH_GCC_AARCH32_HPP_INCLUDED_