2011-10-31 23:51:53 -04:00
|
|
|
#include "atomic-cl-32.hpp"
|
|
|
|
|
2013-05-11 22:24:31 -04:00
|
|
|
namespace factor {
|
2009-05-04 02:46:13 -04:00
|
|
|
|
2009-05-02 05:04:19 -04:00
|
|
|
#define ESP Esp
|
|
|
|
#define EIP Eip
|
2009-05-04 02:46:13 -04:00
|
|
|
|
2009-09-14 13:02:02 -04:00
|
|
|
typedef struct DECLSPEC_ALIGN(16) _M128A {
|
2013-05-11 22:24:31 -04:00
|
|
|
ULONGLONG Low;
|
|
|
|
LONGLONG High;
|
2009-09-14 13:02:02 -04:00
|
|
|
} M128A, *PM128A;
|
|
|
|
|
2016-08-21 10:26:04 -04:00
|
|
|
// The ExtendedRegisters field of the x86.32 CONTEXT structure uses this layout;
|
|
|
|
// however, this structure is only made available from winnt.h on x86.64
|
2009-09-14 13:02:02 -04:00
|
|
|
typedef struct _XMM_SAVE_AREA32 {
|
2016-08-21 10:26:04 -04:00
|
|
|
WORD ControlWord; // 000
|
|
|
|
WORD StatusWord; // 002
|
|
|
|
BYTE TagWord; // 004
|
|
|
|
BYTE Reserved1; // 005
|
|
|
|
WORD ErrorOpcode; // 006
|
|
|
|
DWORD ErrorOffset; // 008
|
|
|
|
WORD ErrorSelector; // 00c
|
|
|
|
WORD Reserved2; // 00e
|
|
|
|
DWORD DataOffset; // 010
|
|
|
|
WORD DataSelector; // 014
|
|
|
|
WORD Reserved3; // 016
|
|
|
|
DWORD MxCsr; // 018
|
|
|
|
DWORD MxCsr_Mask; // 01c
|
|
|
|
M128A FloatRegisters[8]; // 020
|
|
|
|
M128A XmmRegisters[16]; // 0a0
|
|
|
|
BYTE Reserved4[96]; // 1a0
|
2009-09-14 13:02:02 -04:00
|
|
|
} XMM_SAVE_AREA32, *PXMM_SAVE_AREA32;
|
|
|
|
|
|
|
|
#define X87SW(ctx) (ctx)->FloatSave.StatusWord
|
|
|
|
#define MXCSR(ctx) ((XMM_SAVE_AREA32*)((ctx)->ExtendedRegisters))->MxCsr
|
|
|
|
|
2009-05-04 02:46:13 -04:00
|
|
|
}
|