Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-25 09:36:01

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) 2009 Helge Bahmann
0007  * Copyright (c) 2013 Tim Blechmann
0008  * Copyright (c) 2014 Andrey Semashev
0009  */
0010 /*!
0011  * \file   atomic/detail/caps_arch_gcc_ppc.hpp
0012  *
0013  * This header defines feature capabilities macros
0014  */
0015 
0016 #ifndef BOOST_ATOMIC_DETAIL_CAPS_ARCH_GCC_PPC_HPP_INCLUDED_
0017 #define BOOST_ATOMIC_DETAIL_CAPS_ARCH_GCC_PPC_HPP_INCLUDED_
0018 
0019 #include <boost/atomic/detail/config.hpp>
0020 
0021 #ifdef BOOST_HAS_PRAGMA_ONCE
0022 #pragma once
0023 #endif
0024 
0025 #if defined(__POWERPC__) || defined(__PPC__)
0026 
0027 #if defined(_ARCH_PWR8)
0028 // Power8 and later architectures have 8 and 16-bit instructions
0029 #define BOOST_ATOMIC_DETAIL_PPC_HAS_LBARX_STBCX
0030 #define BOOST_ATOMIC_DETAIL_PPC_HAS_LHARX_STHCX
0031 #endif
0032 
0033 #if defined(__powerpc64__) || defined(__PPC64__)
0034 // Power7 and later architectures in 64-bit mode have 64-bit instructions
0035 #define BOOST_ATOMIC_DETAIL_PPC_HAS_LDARX_STDCX
0036 #if defined(_ARCH_PWR8)
0037 // Power8 also has 128-bit instructions
0038 #define BOOST_ATOMIC_DETAIL_PPC_HAS_LQARX_STQCX
0039 #endif
0040 #endif
0041 
0042 #endif // defined(__POWERPC__) || defined(__PPC__)
0043 
0044 #define BOOST_ATOMIC_INT8_LOCK_FREE 2
0045 #define BOOST_ATOMIC_INT16_LOCK_FREE 2
0046 #define BOOST_ATOMIC_INT32_LOCK_FREE 2
0047 #if defined(BOOST_ATOMIC_DETAIL_PPC_HAS_LDARX_STDCX)
0048 #define BOOST_ATOMIC_INT64_LOCK_FREE 2
0049 #endif
0050 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2
0051 
0052 #define BOOST_ATOMIC_THREAD_FENCE 2
0053 #define BOOST_ATOMIC_SIGNAL_FENCE 2
0054 
0055 #endif // BOOST_ATOMIC_DETAIL_CAPS_ARCH_GCC_PPC_HPP_INCLUDED_