Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/context/fcontext.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children | c530137014c0 |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 | |
2 // Copyright Oliver Kowalke 2009. | |
3 // Distributed under the Boost Software License, Version 1.0. | |
4 // (See accompanying file LICENSE_1_0.txt or copy at | |
5 // http://www.boost.org/LICENSE_1_0.txt) | |
6 | |
7 #ifndef BOOST_CONTEXT_FCONTEXT_H | |
8 #define BOOST_CONTEXT_FCONTEXT_H | |
9 | |
10 #if defined(__PGI) | |
11 #include <stdint.h> | |
12 #endif | |
13 | |
14 #if defined(_WIN32_WCE) | |
15 typedef int intptr_t; | |
16 #endif | |
17 | |
18 #include <boost/config.hpp> | |
19 #include <boost/cstdint.hpp> | |
20 | |
21 #include <boost/context/detail/config.hpp> | |
22 | |
23 #ifdef BOOST_HAS_ABI_HEADERS | |
24 # include BOOST_ABI_PREFIX | |
25 #endif | |
26 | |
27 // x86_64 | |
28 // test x86_64 before i386 because icc might | |
29 // define __i686__ for x86_64 too | |
30 #if defined(__x86_64__) || defined(__x86_64) \ | |
31 || defined(__amd64__) || defined(__amd64) \ | |
32 || defined(_M_X64) || defined(_M_AMD64) | |
33 # if defined(BOOST_WINDOWS) | |
34 # include <boost/context/detail/fcontext_x86_64_win.hpp> | |
35 # else | |
36 # include <boost/context/detail/fcontext_x86_64.hpp> | |
37 # endif | |
38 // i386 | |
39 #elif defined(i386) || defined(__i386__) || defined(__i386) \ | |
40 || defined(__i486__) || defined(__i586__) || defined(__i686__) \ | |
41 || defined(__X86__) || defined(_X86_) || defined(__THW_INTEL__) \ | |
42 || defined(__I86__) || defined(__INTEL__) || defined(__IA32__) \ | |
43 || defined(_M_IX86) || defined(_I86_) | |
44 # if defined(BOOST_WINDOWS) | |
45 # include <boost/context/detail/fcontext_i386_win.hpp> | |
46 # else | |
47 # include <boost/context/detail/fcontext_i386.hpp> | |
48 # endif | |
49 // arm | |
50 #elif defined(__arm__) || defined(__thumb__) || defined(__TARGET_ARCH_ARM) \ | |
51 || defined(__TARGET_ARCH_THUMB) || defined(_ARM) || defined(_M_ARM) | |
52 # include <boost/context/detail/fcontext_arm.hpp> | |
53 // mips | |
54 #elif (defined(__mips) && __mips == 1) || defined(_MIPS_ISA_MIPS1) \ | |
55 || defined(_R3000) | |
56 # include <boost/context/detail/fcontext_mips.hpp> | |
57 // powerpc | |
58 #elif defined(__powerpc) || defined(__powerpc__) || defined(__ppc) \ | |
59 || defined(__ppc__) || defined(_ARCH_PPC) || defined(__POWERPC__) \ | |
60 || defined(__PPCGECKO__) || defined(__PPCBROADWAY) || defined(_XENON) | |
61 # include <boost/context/detail/fcontext_ppc.hpp> | |
62 #elif defined(__sparc__) || defined(__sparc) | |
63 // sparc or sparc64 | |
64 # include <boost/context/detail/fcontext_sparc.hpp> | |
65 #else | |
66 # error "platform not supported" | |
67 #endif | |
68 | |
69 namespace boost { | |
70 namespace context { | |
71 | |
72 extern "C" BOOST_CONTEXT_DECL | |
73 intptr_t BOOST_CONTEXT_CALLDECL jump_fcontext( fcontext_t * ofc, fcontext_t const* nfc, intptr_t vp, bool preserve_fpu = true); | |
74 extern "C" BOOST_CONTEXT_DECL | |
75 fcontext_t * BOOST_CONTEXT_CALLDECL make_fcontext( void * sp, std::size_t size, void (* fn)( intptr_t) ); | |
76 | |
77 }} | |
78 | |
79 #ifdef BOOST_HAS_ABI_HEADERS | |
80 # include BOOST_ABI_SUFFIX | |
81 #endif | |
82 | |
83 #endif // BOOST_CONTEXT_FCONTEXT_H | |
84 |