]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/context/include/boost/context/detail/fcontext_sparc.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / context / include / boost / context / detail / fcontext_sparc.hpp
CommitLineData
7c673cae
FG
1// Copyright Martin Husemann 2012
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at
4// http://www.boost.org/LICENSE_1_0.txt)
5
6#ifndef BOOST_CTX_DETAIL_FCONTEXT_SPARC_H
7#define BOOST_CTX_DETAIL_FCONTEXT_SPARC_H
8
9#include <cstddef>
10
11#include <boost/config.hpp>
12#include <boost/cstdint.hpp>
13
14#include <boost/context/detail/config.hpp>
15
16#ifdef BOOST_HAS_ABI_HEADERS
17# include BOOST_ABI_PREFIX
18#endif
19
20namespace boost {
21namespace context {
22
23extern "C" {
24
25#define BOOST_CONTEXT_CALLDECL
26
27// if defined(_LP64) we are compiling for sparc64, otherwise it is 32 bit
28// sparc.
29
30
31struct stack_t
32{
33 void * sp;
34 std::size_t size;
35
36 stack_t() :
37 sp( 0), size( 0)
38 {}
39};
40
41struct fp_t
42{
43#ifdef _LP64
44 boost::uint64_t fp_freg[32];
45 boost::uint64_t fp_fprs, fp_fsr;
46#else
47 boost::uint64_t fp_freg[16];
48 boost::uint32_t fp_fsr;
49#endif
50
51 fp_t() :
52 fp_freg(),
53#ifdef _LP64
54 fp_fprs(),
55#endif
56 fp_fsr()
57 {}
58}
59#ifdef _LP64
60 __attribute__((__aligned__(64))) // allow VIS instructions to be used
61#endif
62;
63
64struct fcontext_t
65{
66 fp_t fc_fp; // fpu stuff first, for easier alignement
67#ifdef _LP64
68 boost::uint64_t
69#else
70 boost::uint32_t
71#endif
72 fc_greg[8];
73 stack_t fc_stack;
74
75 fcontext_t() :
76 fc_fp(),
77 fc_greg(),
78 fc_stack()
79 {}
80};
81
82}
83
84}}
85
86#ifdef BOOST_HAS_ABI_HEADERS
87# include BOOST_ABI_SUFFIX
88#endif
89
90#endif // BOOST_CTX_DETAIL_FCONTEXT_SPARC_H