libcopp  1.1.0
fcontext_x86_64.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 #ifdef COPP_HAS_ABI_HEADERS
23 #include COPP_ABI_PREFIX
24 #endif
25 namespace copp {
26  namespace fcontext {
27 
28  extern "C" {
29 
30 #define COPP_BOOST_CONTEXT_CALLDECL
31 
32  struct stack_t {
33  void *sp;
34  std::size_t size;
35 
36  stack_t() : sp(0), size(0) {}
37  };
38 
39  struct fp_t {
40  uint32_t fc_freg[2];
41 
42  fp_t() : fc_freg() {}
43  };
44 
45  struct fcontext_t {
46  uint64_t fc_greg[8];
47  stack_t fc_stack;
48  fp_t fc_fp;
49 
50  fcontext_t() : fc_greg(), fc_stack(), fc_fp() {}
51  };
52  }
53  }
54 }
55 
56 #ifdef COPP_HAS_ABI_HEADERS
57 #include COPP_ABI_SUFFIX
58 #endif
59 #endif // BOOST_CONTEXT_DETAIL_FCONTEXT_X86_64_H