fcontext_x86_64_win.hpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  8. # pragma once
  9. #endif
  10. #include <cstddef>
  11. #include <boost/config.hpp>
  12. #include <boost/cstdint.hpp>
  13. #include <boost/context/detail/config.hpp>
  14. #if defined(BOOST_MSVC)
  15. #pragma warning(push)
  16. #pragma warning(disable:4351)
  17. #endif
  18. #ifdef BOOST_HAS_ABI_HEADERS
  19. # include BOOST_ABI_PREFIX
  20. #endif
  21. namespace boost {
  22. namespace context {
  23. extern "C" {
  24. #define BOOST_CONTEXT_CALLDECL
  25. struct stack_t
  26. {
  27. void * sp;
  28. std::size_t size;
  29. void * limit;
  30. stack_t() :
  31. sp( 0), size( 0), limit( 0)
  32. {}
  33. };
  34. struct fcontext_t
  35. {
  36. boost::uint64_t fc_greg[10];
  37. stack_t fc_stack;
  38. void * fc_local_storage;
  39. boost::uint64_t fc_fp[24];
  40. boost::uint64_t fc_dealloc;
  41. fcontext_t() :
  42. fc_greg(),
  43. fc_stack(),
  44. fc_local_storage( 0),
  45. fc_fp(),
  46. fc_dealloc()
  47. {}
  48. };
  49. }
  50. }}
  51. #ifdef BOOST_HAS_ABI_HEADERS
  52. # include BOOST_ABI_SUFFIX
  53. #endif
  54. #if defined(BOOST_MSVC)
  55. #pragma warning(pop)
  56. #endif
  57. #endif // BOOST_CONTEXT_DETAIL_FCONTEXT_X86_64_H