libcopp  1.1.0
fcontext_x86_64_win.hpp
Go to the documentation of this file.
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 _COPP_BOOST_CONTEXT_DETAIL_FCONTEXT_X86_64_H
8 #define _COPP_BOOST_CONTEXT_DETAIL_FCONTEXT_X86_64_H
9 
10 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
11 #pragma once
12 #endif
13 
14 #include <cstddef>
15 
16 #include <cstddef>
17 #include <stdint.h>
18 
20 #include "libcopp/utils/features.h"
21 
22 #if defined(COPP_MACRO_COMPILER_MSVC)
23 #pragma warning(push)
24 #pragma warning(disable : 4351)
25 #endif
26 
27 #ifdef COPP_HAS_ABI_HEADERS
28 #include COPP_ABI_PREFIX
29 #endif
30 
31 namespace copp {
32  namespace fcontext {
33 
34  extern "C" {
35 
36 #define COPP_BOOST_CONTEXT_CALLDECL
37 
38  struct stack_t {
39  void *sp;
40  std::size_t size;
41  void *limit;
42 
43  stack_t() : sp(0), size(0), limit(0) {}
44  };
45 
46  struct fcontext_t {
47  uint64_t fc_greg[10];
48  stack_t fc_stack;
49  void *fc_local_storage;
50  uint64_t fc_fp[24];
51  uint64_t fc_dealloc;
52 
53  fcontext_t() : fc_greg(), fc_stack(), fc_local_storage(0), fc_fp(), fc_dealloc() {}
54  };
55  }
56  }
57 }
58 
59 #ifdef COPP_HAS_ABI_HEADERS
60 #include COPP_ABI_SUFFIX
61 #endif
62 
63 #if defined(COPP_MACRO_COMPILER_MSVC)
64 #pragma warning(pop)
65 #endif
66 
67 #endif // _COPP_BOOST_CONTEXT_DETAIL_FCONTEXT_X86_64_H