ReactOS 0.4.16-dev-1946-g52006dd
winnt.h
Go to the documentation of this file.
1
2#pragma once
3
4#include <psdk/winnt.h>
5
6#define CONTEXT_i386 0x10000
7#define CONTEXT_i486 0x10000
8
9#define CONTEXT_I386_CONTROL (CONTEXT_i386 | 0x0001) /* SS:SP, CS:IP, FLAGS, BP */
10#define CONTEXT_I386_INTEGER (CONTEXT_i386 | 0x0002) /* AX, BX, CX, DX, SI, DI */
11#define CONTEXT_I386_SEGMENTS (CONTEXT_i386 | 0x0004) /* DS, ES, FS, GS */
12#define CONTEXT_I386_FLOATING_POINT (CONTEXT_i386 | 0x0008) /* 387 state */
13#define CONTEXT_I386_DEBUG_REGISTERS (CONTEXT_i386 | 0x0010) /* DB 0-3,6,7 */
14#define CONTEXT_I386_EXTENDED_REGISTERS (CONTEXT_i386 | 0x0020)
15#define CONTEXT_I386_XSTATE (CONTEXT_i386 | 0x0040)
16#define CONTEXT_I386_FULL (CONTEXT_I386_CONTROL | CONTEXT_I386_INTEGER | CONTEXT_I386_SEGMENTS)
17#define CONTEXT_I386_ALL (CONTEXT_I386_FULL | CONTEXT_I386_FLOATING_POINT | CONTEXT_I386_DEBUG_REGISTERS | CONTEXT_I386_EXTENDED_REGISTERS)
18
20#ifdef _M_IX86
21typedef CONTEXT I386_CONTEXT;
22#else
24#endif
25
26#define CONTEXT_AMD64 0x100000
27
28#define CONTEXT_AMD64_CONTROL (CONTEXT_AMD64 | 0x0001)
29#define CONTEXT_AMD64_INTEGER (CONTEXT_AMD64 | 0x0002)
30#define CONTEXT_AMD64_SEGMENTS (CONTEXT_AMD64 | 0x0004)
31#define CONTEXT_AMD64_FLOATING_POINT (CONTEXT_AMD64 | 0x0008)
32#define CONTEXT_AMD64_DEBUG_REGISTERS (CONTEXT_AMD64 | 0x0010)
33#define CONTEXT_AMD64_XSTATE (CONTEXT_AMD64 | 0x0040)
34#define CONTEXT_AMD64_FULL (CONTEXT_AMD64_CONTROL | CONTEXT_AMD64_INTEGER | CONTEXT_AMD64_FLOATING_POINT)
35#define CONTEXT_AMD64_ALL (CONTEXT_AMD64_CONTROL | CONTEXT_AMD64_INTEGER | CONTEXT_AMD64_SEGMENTS | CONTEXT_AMD64_FLOATING_POINT | CONTEXT_AMD64_DEBUG_REGISTERS)
36
37typedef struct DECLSPEC_ALIGN(16) _AMD64_CONTEXT {
38 DWORD64 P1Home; /* 000 */
39 DWORD64 P2Home; /* 008 */
40 DWORD64 P3Home; /* 010 */
41 DWORD64 P4Home; /* 018 */
42 DWORD64 P5Home; /* 020 */
43 DWORD64 P6Home; /* 028 */
44
45 /* Control flags */
46 DWORD ContextFlags; /* 030 */
47 DWORD MxCsr; /* 034 */
48
49 /* Segment */
50 WORD SegCs; /* 038 */
51 WORD SegDs; /* 03a */
52 WORD SegEs; /* 03c */
53 WORD SegFs; /* 03e */
54 WORD SegGs; /* 040 */
55 WORD SegSs; /* 042 */
56 DWORD EFlags; /* 044 */
57
58 /* Debug */
59 DWORD64 Dr0; /* 048 */
60 DWORD64 Dr1; /* 050 */
61 DWORD64 Dr2; /* 058 */
62 DWORD64 Dr3; /* 060 */
63 DWORD64 Dr6; /* 068 */
64 DWORD64 Dr7; /* 070 */
65
66 /* Integer */
67 DWORD64 Rax; /* 078 */
68 DWORD64 Rcx; /* 080 */
69 DWORD64 Rdx; /* 088 */
70 DWORD64 Rbx; /* 090 */
71 DWORD64 Rsp; /* 098 */
72 DWORD64 Rbp; /* 0a0 */
73 DWORD64 Rsi; /* 0a8 */
74 DWORD64 Rdi; /* 0b0 */
75 DWORD64 R8; /* 0b8 */
76 DWORD64 R9; /* 0c0 */
77 DWORD64 R10; /* 0c8 */
78 DWORD64 R11; /* 0d0 */
79 DWORD64 R12; /* 0d8 */
80 DWORD64 R13; /* 0e0 */
81 DWORD64 R14; /* 0e8 */
82 DWORD64 R15; /* 0f0 */
83
84 /* Counter */
85 DWORD64 Rip; /* 0f8 */
86
87 /* Floating point */
88 union {
89 XMM_SAVE_AREA32 FltSave; /* 100 */
90 struct {
91 M128A Header[2]; /* 100 */
92 M128A Legacy[8]; /* 120 */
93 M128A Xmm0; /* 1a0 */
94 M128A Xmm1; /* 1b0 */
95 M128A Xmm2; /* 1c0 */
96 M128A Xmm3; /* 1d0 */
97 M128A Xmm4; /* 1e0 */
98 M128A Xmm5; /* 1f0 */
99 M128A Xmm6; /* 200 */
100 M128A Xmm7; /* 210 */
101 M128A Xmm8; /* 220 */
102 M128A Xmm9; /* 230 */
103 M128A Xmm10; /* 240 */
104 M128A Xmm11; /* 250 */
105 M128A Xmm12; /* 260 */
106 M128A Xmm13; /* 270 */
107 M128A Xmm14; /* 280 */
108 M128A Xmm15; /* 290 */
111
112 /* Vector */
113 M128A VectorRegister[26]; /* 300 */
114 DWORD64 VectorControl; /* 4a0 */
115
116 /* Debug control */
117 DWORD64 DebugControl; /* 4a8 */
118 DWORD64 LastBranchToRip; /* 4b0 */
119 DWORD64 LastBranchFromRip; /* 4b8 */
120 DWORD64 LastExceptionToRip; /* 4c0 */
121 DWORD64 LastExceptionFromRip; /* 4c8 */
123
124typedef struct _YMMCONTEXT
125{
142}
144
145typedef struct _XSTATE
146{
152
153#define CONTEXT_UNWOUND_TO_CALL 0x20000000
154
155#define CONTEXT_EXCEPTION_ACTIVE 0x8000000
156#define CONTEXT_SERVICE_ACTIVE 0x10000000
157#define CONTEXT_EXCEPTION_REQUEST 0x40000000
158#define CONTEXT_EXCEPTION_REPORTING 0x80000000
159
160// HACK!
161#ifdef __ROS_LONG64__
162#define ReadAcquire(x) ReadAcquire((volatile long*)(x))
163#define WriteRelease(x, y) WriteRelease((volatile long*)(x), (y))
164#endif
165
166#ifndef __WINE_WINNT_EXCEPTION_REGISTRATION_RECORD
167#define __WINE_WINNT_EXCEPTION_REGISTRATION_RECORD
169
172
174{
175 struct _EXCEPTION_REGISTRATION_RECORD *Prev; // This is 'Next' in MS' headers
178#endif // __WINE_WINNT_EXCEPTION_REGISTRATION_RECORD
179
180#define HEAP_SHARED 0x04000000
@ R15
Definition: amd64_sup.c:13
@ R13
Definition: amd64_sup.c:13
@ R12
Definition: amd64_sup.c:13
@ R9
Definition: amd64_sup.c:13
@ R14
Definition: amd64_sup.c:13
@ R8
Definition: amd64_sup.c:13
@ R11
Definition: amd64_sup.c:13
@ R10
Definition: amd64_sup.c:13
Definition: Header.h:9
#define CDECL
Definition: compat.h:29
CONTEXT * PCONTEXT
Definition: compat.h:699
struct _EXCEPTION_RECORD * PEXCEPTION_RECORD
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned __int64 ULONG64
Definition: imports.h:198
#define DWORD
Definition: nt_native.h:44
#define DECLSPEC_ALIGN(x)
Definition: ntbasedef.h:263
#define DUMMYUNIONNAME
Definition: pecoff.h:91
#define DUMMYSTRUCTNAME
Definition: pecoff.h:117
XSAVE_FORMAT XMM_SAVE_AREA32
Definition: ke.h:35
PEXCEPTION_ROUTINE Handler
Definition: compat.h:727
struct _EXCEPTION_REGISTRATION_RECORD * Prev
Definition: exception.h:45
Definition: winnt.h:146
ULONG64 Mask
Definition: winnt.h:147
YMMCONTEXT YmmContext
Definition: winnt.h:150
ULONG64 CompactionMask
Definition: winnt.h:148
M128A Ymm0
Definition: winnt.h:126
M128A Ymm15
Definition: winnt.h:141
M128A Ymm5
Definition: winnt.h:131
M128A Ymm1
Definition: winnt.h:127
M128A Ymm10
Definition: winnt.h:136
M128A Ymm6
Definition: winnt.h:132
M128A Ymm8
Definition: winnt.h:134
M128A Ymm14
Definition: winnt.h:140
M128A Ymm3
Definition: winnt.h:129
M128A Ymm9
Definition: winnt.h:135
M128A Ymm7
Definition: winnt.h:133
M128A Ymm11
Definition: winnt.h:137
M128A Ymm12
Definition: winnt.h:138
M128A Ymm2
Definition: winnt.h:128
M128A Ymm13
Definition: winnt.h:139
M128A Ymm4
Definition: winnt.h:130
uint64_t DWORD64
Definition: typedefs.h:67
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
struct _YMMCONTEXT YMMCONTEXT
WOW64_CONTEXT I386_CONTEXT
Definition: winnt.h:23
struct _XSTATE * PXSTATE
struct _EXCEPTION_REGISTRATION_RECORD EXCEPTION_REGISTRATION_RECORD
DWORD(CDECL * PEXCEPTION_HANDLER)(PEXCEPTION_RECORD, struct _EXCEPTION_REGISTRATION_RECORD *, PCONTEXT, struct _EXCEPTION_REGISTRATION_RECORD **)
Definition: winnt.h:170
AMD64_CONTEXT
Definition: winnt.h:122
struct _XSTATE XSTATE
struct _YMMCONTEXT * PYMMCONTEXT
WOW64_FLOATING_SAVE_AREA I386_FLOATING_SAVE_AREA
Definition: winnt.h:19
M128A
Definition: ketypes.h:992