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)
6 * Copyright (c) 2017 Andrey Semashev
9 * \file atomic/detail/hwcaps_gcc_ppc.hpp
11 * This header defines hardware capabilities macros for PowerPC
14 #ifndef BOOST_ATOMIC_DETAIL_HWCAPS_GCC_PPC_HPP_INCLUDED_
15 #define BOOST_ATOMIC_DETAIL_HWCAPS_GCC_PPC_HPP_INCLUDED_
17 #include <boost/atomic/detail/config.hpp>
19 #ifdef BOOST_HAS_PRAGMA_ONCE
23 #if defined(__POWERPC__) || defined(__PPC__)
25 #if defined(_ARCH_PWR8)
26 // Power8 and later architectures have 8 and 16-bit instructions
27 #define BOOST_ATOMIC_DETAIL_PPC_HAS_LBARX_STBCX
28 #define BOOST_ATOMIC_DETAIL_PPC_HAS_LHARX_STHCX
31 #if defined(__powerpc64__) || defined(__PPC64__)
32 // Power7 and later architectures in 64-bit mode have 64-bit instructions
33 #define BOOST_ATOMIC_DETAIL_PPC_HAS_LDARX_STDCX
34 #if defined(_ARCH_PWR8)
35 // Power8 also has 128-bit instructions
36 #define BOOST_ATOMIC_DETAIL_PPC_HAS_LQARX_STQCX
40 #endif // defined(__POWERPC__) || defined(__PPC__)
42 #endif // BOOST_ATOMIC_DETAIL_HWCAPS_GCC_PPC_HPP_INCLUDED_