fcontext_mips.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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_MIPS_H
  6. #define BOOST_CONTEXT_DETAIL_FCONTEXT_MIPS_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. // on MIPS we assume 64bit regsiters - even for 32bit ABIs
  19. struct stack_t
  20. {
  21. void * sp;
  22. std::size_t size;
  23. stack_t() :
  24. sp( 0), size( 0)
  25. {}
  26. };
  27. struct fp_t
  28. {
  29. boost::uint64_t fc_freg[6];
  30. fp_t() :
  31. fc_freg()
  32. {}
  33. };
  34. struct fcontext_t
  35. {
  36. boost::uint32_t fc_greg[12];
  37. stack_t fc_stack;
  38. fp_t fc_fp;
  39. fcontext_t() :
  40. fc_greg(),
  41. fc_stack(),
  42. fc_fp()
  43. {}
  44. };
  45. }
  46. }}
  47. #ifdef BOOST_HAS_ABI_HEADERS
  48. # include BOOST_ABI_SUFFIX
  49. #endif
  50. #endif // BOOST_CONTEXT_DETAIL_FCONTEXT_MIPS_H