/vm/os-windows.32.hpp

http://github.com/abeaumont/factor · C++ Header · 38 lines · 30 code · 6 blank · 2 comment · 0 complexity · 50e3c43c0be2fdc04ecdfdf8db265d86 MD5 · raw file

  1. #include "atomic-cl-32.hpp"
  2. namespace factor
  3. {
  4. #define ESP Esp
  5. #define EIP Eip
  6. typedef struct DECLSPEC_ALIGN(16) _M128A {
  7. ULONGLONG Low;
  8. LONGLONG High;
  9. } M128A, *PM128A;
  10. /* The ExtendedRegisters field of the x86.32 CONTEXT structure uses this layout; however,
  11. * this structure is only made available from winnt.h on x86.64 */
  12. typedef struct _XMM_SAVE_AREA32 {
  13. WORD ControlWord; /* 000 */
  14. WORD StatusWord; /* 002 */
  15. BYTE TagWord; /* 004 */
  16. BYTE Reserved1; /* 005 */
  17. WORD ErrorOpcode; /* 006 */
  18. DWORD ErrorOffset; /* 008 */
  19. WORD ErrorSelector; /* 00c */
  20. WORD Reserved2; /* 00e */
  21. DWORD DataOffset; /* 010 */
  22. WORD DataSelector; /* 014 */
  23. WORD Reserved3; /* 016 */
  24. DWORD MxCsr; /* 018 */
  25. DWORD MxCsr_Mask; /* 01c */
  26. M128A FloatRegisters[8]; /* 020 */
  27. M128A XmmRegisters[16]; /* 0a0 */
  28. BYTE Reserved4[96]; /* 1a0 */
  29. } XMM_SAVE_AREA32, *PXMM_SAVE_AREA32;
  30. #define X87SW(ctx) (ctx)->FloatSave.StatusWord
  31. #define MXCSR(ctx) ((XMM_SAVE_AREA32*)((ctx)->ExtendedRegisters))->MxCsr
  32. }