libcopp  2.2.0
fcontext_mips.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 // clang-format off
8 #include <libcopp/utils/config/stl_include_prefix.h> // NOLINT(build/include_order)
9 // clang-format on
10 #include <stdint.h>
11 #include <cstddef>
12 // clang-format off
13 #include <libcopp/utils/config/stl_include_suffix.h> // NOLINT(build/include_order)
14 // clang-format on
15 
17 #include "libcopp/utils/features.h"
18 
19 #ifdef COPP_HAS_ABI_HEADERS
20 # include COPP_ABI_PREFIX
21 #endif
22 
23 LIBCOPP_COPP_NAMESPACE_BEGIN
24 namespace fcontext {
25 
26 extern "C" {
27 
28 #define COPP_BOOST_CONTEXT_CALLDECL
29 
30 // on MIPS we assume 64bit regsiters - even for 32bit ABIs
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  uint64_t fc_freg[6];
41 
42  fp_t() : fc_freg() {}
43 };
44 
45 struct fcontext_t {
46  uint32_t fc_greg[12];
47  stack_t fc_stack;
48  fp_t fc_fp;
49 
51 };
52 }
53 } // namespace fcontext
54 LIBCOPP_COPP_NAMESPACE_END
55 
56 #ifdef COPP_HAS_ABI_HEADERS
57 # include COPP_ABI_SUFFIX
58 #endif
void * fcontext_t
Definition: fcontext.hpp:27
uint32_t fc_greg[11]
uint32_t fc_freg[16]
std::size_t size