File indexing completed on 2025-01-30 09:33:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef BOOST_ATOMIC_DETAIL_CAPS_ARCH_GCC_ARM_HPP_INCLUDED_
0019 #define BOOST_ATOMIC_DETAIL_CAPS_ARCH_GCC_ARM_HPP_INCLUDED_
0020
0021 #include <boost/atomic/detail/config.hpp>
0022 #include <boost/atomic/detail/platform.hpp>
0023
0024 #ifdef BOOST_HAS_PRAGMA_ONCE
0025 #pragma once
0026 #endif
0027
0028 #if defined(__ARMEL__) || \
0029 (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || \
0030 (defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \
0031 defined(BOOST_WINDOWS)
0032 #define BOOST_ATOMIC_DETAIL_ARM_LITTLE_ENDIAN
0033 #elif defined(__ARMEB__) || \
0034 defined(__ARM_BIG_ENDIAN) || \
0035 (defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) || \
0036 (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__))
0037 #define BOOST_ATOMIC_DETAIL_ARM_BIG_ENDIAN
0038 #else
0039 #include <boost/predef/other/endian.h>
0040 #if BOOST_ENDIAN_LITTLE_BYTE
0041 #define BOOST_ATOMIC_DETAIL_ARM_LITTLE_ENDIAN
0042 #elif BOOST_ENDIAN_BIG_BYTE
0043 #define BOOST_ATOMIC_DETAIL_ARM_BIG_ENDIAN
0044 #else
0045 #error "Boost.Atomic: Failed to determine ARM endianness, the target platform is not supported. Please, report to the developers (patches are welcome)."
0046 #endif
0047 #endif
0048
0049 #if defined(__GNUC__) && defined(__arm__) && (BOOST_ATOMIC_DETAIL_ARM_ARCH >= 6)
0050
0051 #if BOOST_ATOMIC_DETAIL_ARM_ARCH > 6
0052
0053 #define BOOST_ATOMIC_DETAIL_ARM_HAS_DMB 1
0054 #endif
0055
0056 #if defined(__ARM_FEATURE_LDREX)
0057
0058 #if (__ARM_FEATURE_LDREX & 1)
0059 #define BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXB_STREXB 1
0060 #endif
0061 #if (__ARM_FEATURE_LDREX & 2)
0062 #define BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXH_STREXH 1
0063 #endif
0064 #if (__ARM_FEATURE_LDREX & 8)
0065 #define BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXD_STREXD 1
0066 #endif
0067
0068 #else
0069
0070 #if !(defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6Z__))
0071
0072
0073 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409
0074 #define BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXB_STREXB 1
0075 #define BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXH_STREXH 1
0076 #endif
0077
0078 #if !(((defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6ZK__)) && defined(__thumb__)) || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7M__))
0079
0080
0081
0082
0083 #define BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXD_STREXD 1
0084 #endif
0085
0086 #endif
0087
0088 #endif
0089
0090 #endif
0091
0092 #define BOOST_ATOMIC_INT8_LOCK_FREE 2
0093 #define BOOST_ATOMIC_INT16_LOCK_FREE 2
0094 #define BOOST_ATOMIC_INT32_LOCK_FREE 2
0095 #if defined(BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXD_STREXD)
0096 #define BOOST_ATOMIC_INT64_LOCK_FREE 2
0097 #endif
0098 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2
0099
0100 #define BOOST_ATOMIC_THREAD_FENCE 2
0101 #define BOOST_ATOMIC_SIGNAL_FENCE 2
0102
0103 #endif