* Sync to trunk HEAD (r53473).
[reactos.git] / include / asm / genincdata.c
1 #undef __MSVCRT__
2 #include <psdk/ntverp.h>
3
4 /* DDK/IFS/NDK Headers */
5 #include <excpt.h>
6 #include <setjmp.h>
7 #include <ntdef.h>
8 #include <ntifs.h>
9 #include <arc/arc.h>
10 #include <ntndk.h>
11 #include <bugcodes.h>
12
13 /* KD Support */
14 #define NOEXTAPI
15 #include <windbgkd.h>
16 #include <wdbgexts.h>
17 #include <kddll.h>
18
19 // FIXME: where to put this?
20 typedef struct _FIBER /* Field offsets: */
21 { /* 32 bit 64 bit */
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 */
32 } FIBER, *PFIBER;
33
34 typedef struct
35 {
36 char Type;
37 char Name[55];
38 ULONGLONG Value;
39 } ASMGENDATA;
40
41 #define TYPE_END 0
42 #define TYPE_RAW 1
43 #define TYPE_CONSTANT 2
44 #define TYPE_HEADER 3
45
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}
55
56 #if defined(_MSC_VER)
57 #pragma section(".asmdef")
58 __declspec(allocate(".asmdef"))
59 #elif defined(__GNUC__)
60 __attribute__ ((section(".asmdef")))
61 #else
62 #error Your compiler is not supported.
63 #endif
64
65 ASMGENDATA Table[] =
66 {
67
68 /* PORTABLE CONSTANTS ********************************************************/
69 #include "ksx.template.h"
70
71 /* ARCHITECTURE SPECIFIC CONTSTANTS ******************************************/
72 #ifdef _M_IX86
73 #include "ks386.template.h"
74 #elif defined(_M_AMD64)
75 #include "ksamd64.template.h"
76 #endif
77
78 /* End of list */
79 {TYPE_END, "", 0}
80 };
81