]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/atomic/include/boost/atomic/detail/caps_gcc_arm.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / atomic / include / boost / atomic / detail / caps_gcc_arm.hpp
CommitLineData
7c673cae
FG
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) 2009 Helge Bahmann
7 * Copyright (c) 2009 Phil Endecott
8 * Copyright (c) 2013 Tim Blechmann
9 * ARM Code by Phil Endecott, based on other architectures.
10 * Copyright (c) 2014 Andrey Semashev
11 */
12/*!
13 * \file atomic/detail/caps_gcc_arm.hpp
14 *
15 * This header defines feature capabilities macros
16 */
17
18#ifndef BOOST_ATOMIC_DETAIL_CAPS_GCC_ARM_HPP_INCLUDED_
19#define BOOST_ATOMIC_DETAIL_CAPS_GCC_ARM_HPP_INCLUDED_
20
21#include <boost/atomic/detail/config.hpp>
22
23#ifdef BOOST_HAS_PRAGMA_ONCE
24#pragma once
25#endif
26
27#if !(defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6ZK__))
28// ARMv7 and later have dmb instruction
29#define BOOST_ATOMIC_DETAIL_ARM_HAS_DMB 1
30#endif
31
32#if !(defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6Z__))
33// ARMv6k and ARMv7 have 8 and 16 ldrex/strex variants
34#define BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXB_STREXB 1
35#define BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXH_STREXH 1
36#if !(((defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6ZK__)) && defined(__thumb__)) || defined(__ARM_ARCH_7M__))
37// ARMv6k and ARMv7 except ARMv7-M have 64-bit ldrex/strex variants.
38// Unfortunately, GCC (at least 4.7.3 on Ubuntu) does not allocate register pairs properly when targeting ARMv6k Thumb,
39// which is required for ldrexd/strexd instructions, so we disable 64-bit support. When targeting ARMv6k ARM
40// or ARMv7 (both ARM and Thumb 2) it works as expected.
41#define BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXD_STREXD 1
42#endif
43#endif
44
45#define BOOST_ATOMIC_INT8_LOCK_FREE 2
46#define BOOST_ATOMIC_INT16_LOCK_FREE 2
47#define BOOST_ATOMIC_INT32_LOCK_FREE 2
48#if defined(BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXD_STREXD)
49#define BOOST_ATOMIC_INT64_LOCK_FREE 2
50#endif
51#define BOOST_ATOMIC_POINTER_LOCK_FREE 2
52
53#define BOOST_ATOMIC_THREAD_FENCE 2
54#define BOOST_ATOMIC_SIGNAL_FENCE 2
55
56#endif // BOOST_ATOMIC_DETAIL_CAPS_GCC_ARM_HPP_INCLUDED_