libcopp  2.2.0
fcontext_i386_win.hpp
Go to the documentation of this file.
1 // Copyright 2023 owent
2 
3 #pragma once
4 
5 #include <libcopp/utils/config/libcopp_build_features.h>
6 
7 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
8 # pragma once
9 #endif
10 
11 // clang-format off
12 #include <libcopp/utils/config/stl_include_prefix.h> // NOLINT(build/include_order)
13 // clang-format on
14 #include <stdint.h>
15 #include <cstddef>
16 // clang-format off
17 #include <libcopp/utils/config/stl_include_suffix.h> // NOLINT(build/include_order)
18 // clang-format on
19 
21 #include "libcopp/utils/features.h"
22 
23 #if defined(COPP_MACRO_COMPILER_MSVC)
24 # pragma warning(push)
25 # pragma warning(disable : 4351)
26 #endif
27 
28 #ifdef COPP_HAS_ABI_HEADERS
29 # include COPP_ABI_PREFIX
30 #endif
31 
32 LIBCOPP_COPP_NAMESPACE_BEGIN
33 namespace fcontext {
34 
35 extern "C" {
36 
37 #define COPP_BOOST_CONTEXT_CALLDECL __cdecl
38 
39 struct stack_t {
40  void *sp;
41  std::size_t size;
42  void *limit;
43 
44  stack_t() : sp(0), size(0), limit(0) {}
45 };
46 
47 struct fp_t {
48  uint32_t fc_freg[2];
49 
50  fp_t() : fc_freg() {}
51 };
52 
53 struct fcontext_t {
54  uint32_t fc_greg[6];
55  stack_t fc_stack;
56  void *fc_excpt_lst;
58  fp_t fc_fp;
59  uint32_t fc_dealloc;
60 
62 };
63 }
64 } // namespace fcontext
65 LIBCOPP_COPP_NAMESPACE_END
66 
67 #ifdef COPP_HAS_ABI_HEADERS
68 # include COPP_ABI_SUFFIX
69 #endif
70 
71 #if defined(COPP_MACRO_COMPILER_MSVC)
72 # pragma warning(pop)
73 #endif
void * fcontext_t
Definition: fcontext.hpp:27
uint32_t fc_greg[11]
uint32_t fc_freg[16]
std::size_t size