2 #include <psdk/ntverp.h>
4 /* DDK/IFS/NDK Headers */
19 // FIXME: where to put this?
20 typedef struct _FIBER
/* Field offsets: */
22 /* this must be the first field */
23 PVOID Parameter
; /* 0x00 0x00 */
24 struct _EXCEPTION_REGISTRATION_RECORD
* ExceptionList
; /* 0x04 0x08 */
25 PVOID StackBase
; /* 0x08 0x10 */
26 PVOID StackLimit
; /* 0x0C 0x18 */
27 PVOID DeallocationStack
; /* 0x10 0x20 */
28 CONTEXT Context
; /* 0x14 0x28 */
29 ULONG GuaranteedStackBytes
; /* 0x2E0 */
30 PVOID FlsData
; /* 0x2E4 */
31 PVOID ActivationContextStack
; /* 0x2E8 */
43 #define TYPE_CONSTANT 2
46 #define RAW(x) {TYPE_RAW, x, 0}
47 #define CONSTANT(name) {TYPE_CONSTANT, #name, (ULONG)name}
48 #define CONSTANT64(name) {TYPE_CONSTANT, #name, (ULONGLONG)name}
49 #define CONSTANTPTR(name) {TYPE_CONSTANT, #name, (ULONG_PTR)name}
50 #define CONSTANTX(name, value) {TYPE_CONSTANT, #name, value}
51 #define OFFSET(name, struct, member) {TYPE_CONSTANT, #name, FIELD_OFFSET(struct, member)}
52 #define RELOFFSET(name, struct, member, to) {TYPE_CONSTANT, #name, FIELD_OFFSET(struct, member) - FIELD_OFFSET(struct, to)}
53 #define SIZE(name, struct) {TYPE_CONSTANT, #name, sizeof(struct)}
54 #define HEADER(x) {TYPE_HEADER, x, 0}
57 #pragma section(".asmdef")
58 __declspec(allocate(".asmdef"))
59 #elif defined(__GNUC__)
60 __attribute__ ((section(".asmdef")))
62 #error Your compiler is not supported.
68 /* PORTABLE CONSTANTS ********************************************************/
69 #include "ksx.template.h"
71 /* ARCHITECTURE SPECIFIC CONTSTANTS ******************************************/
73 #include "ks386.template.h"
74 #elif defined(_M_AMD64)
75 #include "ksamd64.template.h"