Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:33:57

0001 /*
0002  * Distributed under the Boost Software License, Version 1.0.
0003  * (See accompanying file LICENSE_1_0.txt or copy at
0004  * http://www.boost.org/LICENSE_1_0.txt)
0005  *
0006  * Copyright (c) 2020 Andrey Semashev
0007  */
0008 /*!
0009  * \file   atomic/detail/ops_gcc_aarch32_common.hpp
0010  *
0011  * This header contains basic utilities for gcc AArch32 backend.
0012  */
0013 
0014 #ifndef BOOST_ATOMIC_DETAIL_OPS_GCC_AARCH32_COMMON_HPP_INCLUDED_
0015 #define BOOST_ATOMIC_DETAIL_OPS_GCC_AARCH32_COMMON_HPP_INCLUDED_
0016 
0017 #include <boost/atomic/detail/config.hpp>
0018 #include <boost/atomic/detail/capabilities.hpp>
0019 
0020 #ifdef BOOST_HAS_PRAGMA_ONCE
0021 #pragma once
0022 #endif
0023 
0024 #define BOOST_ATOMIC_DETAIL_AARCH32_MO_SWITCH(mo)\
0025     switch (mo)\
0026     {\
0027     case memory_order_relaxed:\
0028         BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN("r", "r")\
0029         break;\
0030     \
0031     case memory_order_consume:\
0032     case memory_order_acquire:\
0033         BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN("a", "r")\
0034         break;\
0035     \
0036     case memory_order_release:\
0037         BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN("r", "l")\
0038         break;\
0039     \
0040     default:\
0041         BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN("a", "l")\
0042         break;\
0043     }
0044 
0045 #if defined(BOOST_ATOMIC_DETAIL_AARCH32_LITTLE_ENDIAN)
0046 #define BOOST_ATOMIC_DETAIL_AARCH32_ASM_ARG_LO(arg) "%" BOOST_STRINGIZE(arg)
0047 #define BOOST_ATOMIC_DETAIL_AARCH32_ASM_ARG_HI(arg) "%H" BOOST_STRINGIZE(arg)
0048 #else
0049 #define BOOST_ATOMIC_DETAIL_AARCH32_ASM_ARG_LO(arg) "%H" BOOST_STRINGIZE(arg)
0050 #define BOOST_ATOMIC_DETAIL_AARCH32_ASM_ARG_HI(arg) "%" BOOST_STRINGIZE(arg)
0051 #endif
0052 
0053 #endif // BOOST_ATOMIC_DETAIL_OPS_GCC_AARCH32_COMMON_HPP_INCLUDED_