PageRenderTime 29ms CodeModel.GetById 21ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

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