Chris@16
|
1 #ifndef BOOST_ATOMIC_DETAIL_PLATFORM_HPP
|
Chris@16
|
2 #define BOOST_ATOMIC_DETAIL_PLATFORM_HPP
|
Chris@16
|
3
|
Chris@16
|
4 // Copyright (c) 2009 Helge Bahmann
|
Chris@16
|
5 //
|
Chris@16
|
6 // Distributed under the Boost Software License, Version 1.0.
|
Chris@16
|
7 // See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
8 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
9
|
Chris@16
|
10 // Platform selection file
|
Chris@16
|
11
|
Chris@16
|
12 #include <boost/atomic/detail/config.hpp>
|
Chris@16
|
13
|
Chris@16
|
14 #ifdef BOOST_HAS_PRAGMA_ONCE
|
Chris@16
|
15 #pragma once
|
Chris@16
|
16 #endif
|
Chris@16
|
17
|
Chris@16
|
18 // Intel compiler does not support __atomic* intrinsics properly, although defines them (tested with 13.0.1 and 13.1.1 on Linux)
|
Chris@16
|
19 #if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 407) && !defined(BOOST_INTEL_CXX_VERSION))\
|
Chris@16
|
20 || (defined(BOOST_CLANG) && ((__clang_major__ * 100 + __clang_minor__) >= 302))
|
Chris@16
|
21
|
Chris@16
|
22 #include <boost/atomic/detail/gcc-atomic.hpp>
|
Chris@16
|
23
|
Chris@16
|
24 #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
Chris@16
|
25
|
Chris@16
|
26 #include <boost/atomic/detail/gcc-x86.hpp>
|
Chris@16
|
27
|
Chris@16
|
28 #elif 0 && defined(__GNUC__) && defined(__alpha__) /* currently does not work correctly */
|
Chris@16
|
29
|
Chris@16
|
30 #include <boost/atomic/detail/base.hpp>
|
Chris@16
|
31 #include <boost/atomic/detail/gcc-alpha.hpp>
|
Chris@16
|
32
|
Chris@16
|
33 #elif defined(__GNUC__) && (defined(__POWERPC__) || defined(__PPC__))
|
Chris@16
|
34
|
Chris@16
|
35 #include <boost/atomic/detail/gcc-ppc.hpp>
|
Chris@16
|
36
|
Chris@16
|
37 // This list of ARM architecture versions comes from Apple's arm/arch.h header.
|
Chris@16
|
38 // I don't know how complete it is.
|
Chris@16
|
39 #elif defined(__GNUC__) && (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
|
Chris@16
|
40 || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) \
|
Chris@16
|
41 || defined(__ARM_ARCH_6K__) \
|
Chris@16
|
42 || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
|
Chris@16
|
43 || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \
|
Chris@16
|
44 || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7S__))
|
Chris@16
|
45
|
Chris@16
|
46 #include <boost/atomic/detail/gcc-armv6plus.hpp>
|
Chris@16
|
47
|
Chris@16
|
48 #elif defined(__linux__) && defined(__arm__)
|
Chris@16
|
49
|
Chris@16
|
50 #include <boost/atomic/detail/linux-arm.hpp>
|
Chris@16
|
51
|
Chris@16
|
52 #elif defined(__GNUC__) && defined(__sparc_v9__)
|
Chris@16
|
53
|
Chris@16
|
54 #include <boost/atomic/detail/gcc-sparcv9.hpp>
|
Chris@16
|
55
|
Chris@16
|
56 #elif defined(BOOST_WINDOWS) || defined(_WIN32_CE)
|
Chris@16
|
57
|
Chris@16
|
58 #include <boost/atomic/detail/windows.hpp>
|
Chris@16
|
59
|
Chris@16
|
60 #elif 0 && defined(__GNUC__) /* currently does not work correctly */
|
Chris@16
|
61
|
Chris@16
|
62 #include <boost/atomic/detail/base.hpp>
|
Chris@16
|
63 #include <boost/atomic/detail/gcc-cas.hpp>
|
Chris@16
|
64
|
Chris@16
|
65 #else
|
Chris@16
|
66
|
Chris@16
|
67 #include <boost/atomic/detail/base.hpp>
|
Chris@16
|
68
|
Chris@16
|
69 #endif
|
Chris@16
|
70
|
Chris@16
|
71 #endif
|