fcontext_ppc.hpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // Copyright Oliver Kowalke 2009.
  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. #ifndef BOOST_CONTEXT_DETAIL_FCONTEXT_PPC_H
  6. #define BOOST_CONTEXT_DETAIL_FCONTEXT_PPC_H
  7. #include <cstddef>
  8. #include <boost/config.hpp>
  9. #include <boost/cstdint.hpp>
  10. #include <boost/context/detail/config.hpp>
  11. #ifdef BOOST_HAS_ABI_HEADERS
  12. # include BOOST_ABI_PREFIX
  13. #endif
  14. namespace boost {
  15. namespace context {
  16. extern "C" {
  17. #define BOOST_CONTEXT_CALLDECL
  18. struct stack_t
  19. {
  20. void * sp;
  21. std::size_t size;
  22. stack_t() :
  23. sp( 0), size( 0)
  24. {}
  25. };
  26. struct fp_t
  27. {
  28. boost::uint64_t fc_freg[19];
  29. fp_t() :
  30. fc_freg()
  31. {}
  32. };
  33. struct fcontext_t
  34. {
  35. # if defined(__powerpc64__)
  36. boost::uint64_t fc_greg[23];
  37. # else
  38. boost::uint32_t fc_greg[23];
  39. # endif
  40. stack_t fc_stack;
  41. fp_t fc_fp;
  42. fcontext_t() :
  43. fc_greg(),
  44. fc_stack(),
  45. fc_fp()
  46. {}
  47. };
  48. }
  49. }}
  50. #ifdef BOOST_HAS_ABI_HEADERS
  51. # include BOOST_ABI_SUFFIX
  52. #endif
  53. #endif // BOOST_CONTEXT_DETAIL_FCONTEXT_PPC_H