libcopp
2.2.0
include
libcopp
fcontext
detail
fcontext_sparc.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
16
#include "
libcopp/fcontext/detail/config.hpp
"
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
// if defined(_LP64) we are compiling for sparc64, otherwise it is 32 bit
31
// sparc.
32
33
struct
stack_t {
34
void
*
sp
;
35
std::size_t
size
;
36
37
stack_t
() :
sp
(0),
size
(0) {}
38
};
39
40
struct
fp_t {
41
#ifdef _LP64
42
uint64_t
fp_freg
[32];
43
uint64_t fp_fprs,
fp_fsr
;
44
#else
45
uint64_t
fp_freg
[16];
46
uint32_t
fp_fsr
;
47
#endif
48
49
fp_t
()
50
:
fp_freg
(),
51
#ifdef _LP64
52
fp_fprs(),
53
#endif
54
fp_fsr
() {
55
}
56
}
57
#ifdef _LP64
58
__attribute__((__aligned__(64)))
// allow VIS instructions to be used
59
#endif
60
;
61
62
struct
fcontext_t
{
63
fp_t
fc_fp
;
// fpu stuff first, for easier alignement
64
#ifdef _LP64
65
uint64_t
66
#else
67
uint32_t
68
#endif
69
fc_greg
[8];
70
stack_t
fc_stack
;
71
72
fcontext_t
() :
fc_fp
(),
fc_greg
(),
fc_stack
() {}
73
};
74
}
75
}
// namespace fcontext
76
LIBCOPP_COPP_NAMESPACE_END
77
78
#ifdef COPP_HAS_ABI_HEADERS
79
# include COPP_ABI_SUFFIX
80
#endif
config.hpp
features.h
fcontext
Definition:
fcontext_arm.hpp:23
fcontext::fcontext_t
void * fcontext_t
Definition:
fcontext.hpp:27
stl_include_prefix.h
stl_include_suffix.h
fcontext::fcontext_t::fc_stack
stack_t fc_stack
Definition:
fcontext_arm.hpp:44
fcontext::fcontext_t::fcontext_t
fcontext_t()
Definition:
fcontext_sparc.hpp:72
fcontext::fcontext_t::fc_greg
uint32_t fc_greg[11]
Definition:
fcontext_arm.hpp:43
fcontext::fcontext_t::fc_fp
fp_t fc_fp
Definition:
fcontext_arm.hpp:45
fcontext::fp_t::fp_freg
uint64_t fp_freg[16]
Definition:
fcontext_sparc.hpp:45
fcontext::fp_t::fp_t
fp_t()
Definition:
fcontext_sparc.hpp:49
fcontext::fp_t::fp_fsr
uint32_t fp_fsr
Definition:
fcontext_sparc.hpp:46
fcontext::stack_t::size
std::size_t size
Definition:
fcontext_arm.hpp:31
fcontext::stack_t::sp
void * sp
Definition:
fcontext_arm.hpp:30
fcontext::stack_t::stack_t
stack_t()
Definition:
fcontext_sparc.hpp:37
Generated by
1.9.1