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