fcontext_x86_64.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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_X86_64_H
  6. #define BOOST_CONTEXT_DETAIL_FCONTEXT_X86_64_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::uint32_t fc_freg[2];
  29. fp_t() :
  30. fc_freg()
  31. {}
  32. };
  33. struct fcontext_t
  34. {
  35. boost::uint64_t fc_greg[8];
  36. stack_t fc_stack;
  37. fp_t fc_fp;
  38. fcontext_t() :
  39. fc_greg(),
  40. fc_stack(),
  41. fc_fp()
  42. {}
  43. };
  44. }
  45. }}
  46. #ifdef BOOST_HAS_ABI_HEADERS
  47. # include BOOST_ABI_SUFFIX
  48. #endif
  49. #endif // BOOST_CONTEXT_DETAIL_FCONTEXT_X86_64_H