libcopp 2.3.1
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fcontext_i386.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#ifdef LIBCOPP_HAS_ABI_HEADERS
24# include LIBCOPP_ABI_PREFIX
25#endif
26LIBCOPP_COPP_NAMESPACE_BEGIN
27namespace fcontext {
28
29extern "C" {
30
31#define LIBCOPP_BOOST_CONTEXT_CALLDECL __attribute__((cdecl))
32
33struct stack_t {
34 void *sp;
35 std::size_t size;
36
37 stack_t() : sp(0), size(0) {}
38};
39
40struct fcontext_t {
41 uint32_t fc_greg[6];
42 stack_t fc_stack;
43 uint32_t fc_freg[2];
44
46};
47}
48} // namespace fcontext
49LIBCOPP_COPP_NAMESPACE_END
50
51#ifdef LIBCOPP_HAS_ABI_HEADERS
52# include LIBCOPP_ABI_SUFFIX
53#endif