libcopp  1.1.0
fcontext_i386_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_I386H
8 #define _COPP_BOOST_CONTEXT_DETAIL_FCONTEXT_I386H
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 __cdecl
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 fp_t {
47  uint32_t fc_freg[2];
48 
49  fp_t() : fc_freg() {}
50  };
51 
52  struct fcontext_t {
53  uint32_t fc_greg[6];
54  stack_t fc_stack;
55  void *fc_excpt_lst;
57  fp_t fc_fp;
58  uint32_t fc_dealloc;
59 
60  fcontext_t() : fc_greg(), fc_stack(), fc_excpt_lst(0), fc_local_storage(0), fc_fp(), fc_dealloc(0) {}
61  };
62  }
63  }
64 }
65 
66 #ifdef COPP_HAS_ABI_HEADERS
67 #include COPP_ABI_SUFFIX
68 #endif
69 
70 #if defined(COPP_MACRO_COMPILER_MSVC)
71 #pragma warning(pop)
72 #endif
73 
74 #endif // _COPP_BOOST_CONTEXT_DETAIL_FCONTEXT_I386_H