libcopp 2.3.1
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
22
23#if defined(LIBCOPP_MACRO_COMPILER_MSVC)
24# pragma warning(push)
25# pragma warning(disable : 4351)
26#endif
27
28#ifdef LIBCOPP_HAS_ABI_HEADERS
29# include LIBCOPP_ABI_PREFIX
30#endif
31
32LIBCOPP_COPP_NAMESPACE_BEGIN
33namespace fcontext {
34
35extern "C" {
36
37#define LIBCOPP_BOOST_CONTEXT_CALLDECL __cdecl
38
39struct 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
47struct fp_t {
48 uint32_t fc_freg[2];
49
50 fp_t() : fc_freg() {}
51};
52
53struct fcontext_t {
54 uint32_t fc_greg[6];
55 stack_t fc_stack;
58 fp_t fc_fp;
59 uint32_t fc_dealloc;
60
62};
63}
64} // namespace fcontext
65LIBCOPP_COPP_NAMESPACE_END
66
67#ifdef LIBCOPP_HAS_ABI_HEADERS
68# include LIBCOPP_ABI_SUFFIX
69#endif
70
71#if defined(LIBCOPP_MACRO_COMPILER_MSVC)
72# pragma warning(pop)
73#endif
uint32_t fc_freg[16]