Back to home page

EIC code displayed by LXR

 
 

    


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

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) 2012 - 2014 Andrey Semashev
0009  */
0010 /*!
0011  * \file   atomic/detail/caps_arch_msvc_x86.hpp
0012  *
0013  * This header defines feature capabilities macros
0014  */
0015 
0016 #ifndef BOOST_ATOMIC_DETAIL_CAPS_ARCH_MSVC_X86_HPP_INCLUDED_
0017 #define BOOST_ATOMIC_DETAIL_CAPS_ARCH_MSVC_X86_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(_M_IX86) && _M_IX86 >= 500
0026 #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B 1
0027 #endif
0028 
0029 #if defined(_M_AMD64) && !defined(BOOST_ATOMIC_NO_CMPXCHG16B)
0030 #if defined(__clang__)
0031 #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
0032 #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B 1
0033 #endif
0034 #elif _MSC_VER >= 1500
0035 #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B 1
0036 #endif
0037 #endif
0038 
0039 #if defined(_MSC_VER) && (defined(_M_AMD64) || (defined(_M_IX86) && defined(_M_IX86_FP) && _M_IX86_FP >= 2))
0040 // Use mfence only if SSE2 is available
0041 #define BOOST_ATOMIC_DETAIL_X86_HAS_MFENCE 1
0042 #endif
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 
0048 #if defined(_M_AMD64) || defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B)
0049 #define BOOST_ATOMIC_INT64_LOCK_FREE 2
0050 #endif
0051 
0052 #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B)
0053 #define BOOST_ATOMIC_INT128_LOCK_FREE 2
0054 #endif
0055 
0056 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2
0057 
0058 #define BOOST_ATOMIC_THREAD_FENCE 2
0059 #define BOOST_ATOMIC_SIGNAL_FENCE 2
0060 
0061 #endif // BOOST_ATOMIC_DETAIL_CAPS_ARCH_MSVC_X86_HPP_INCLUDED_