Sync with trunk r58033.
[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 #ifdef _M_AMD64
20 enum
21 {
22 P1Home = 1 * sizeof(PVOID),
23 P2Home = 2 * sizeof(PVOID),
24 P3Home = 3 * sizeof(PVOID),
25 P4Home = 4 * sizeof(PVOID),
26 };
27 #endif
28
29 // FIXME: where to put this?
30 typedef struct _FIBER /* Field offsets: */
31 { /* 32 bit 64 bit */
32 /* this must be the first field */
33 PVOID Parameter; /* 0x00 0x00 */
34 struct _EXCEPTION_REGISTRATION_RECORD * ExceptionList; /* 0x04 0x08 */
35 PVOID StackBase; /* 0x08 0x10 */
36 PVOID StackLimit; /* 0x0C 0x18 */
37 PVOID DeallocationStack; /* 0x10 0x20 */
38 CONTEXT Context; /* 0x14 0x28 */
39 ULONG GuaranteedStackBytes; /* 0x2E0 */
40 PVOID FlsData; /* 0x2E4 */
41 PVOID ActivationContextStack; /* 0x2E8 */
42 } FIBER, *PFIBER;
43
44 typedef struct
45 {
46 char Type;
47 char Name[55];
48 ULONGLONG Value;
49 } ASMGENDATA;
50
51 #define TYPE_END 0
52 #define TYPE_RAW 1
53 #define TYPE_CONSTANT 2
54 #define TYPE_HEADER 3
55
56 #define RAW(x) {TYPE_RAW, x, 0}
57 #define CONSTANT(name) {TYPE_CONSTANT, #name, (ULONG)name}
58 #define CONSTANT64(name) {TYPE_CONSTANT, #name, (ULONGLONG)name}
59 #define CONSTANTPTR(name) {TYPE_CONSTANT, #name, (ULONG_PTR)name}
60 #define CONSTANTX(name, value) {TYPE_CONSTANT, #name, value}
61 #define OFFSET(name, struct, member) {TYPE_CONSTANT, #name, FIELD_OFFSET(struct, member)}
62 #define RELOFFSET(name, struct, member, to) {TYPE_CONSTANT, #name, FIELD_OFFSET(struct, member) - FIELD_OFFSET(struct, to)}
63 #define SIZE(name, struct) {TYPE_CONSTANT, #name, sizeof(struct)}
64 #define HEADER(x) {TYPE_HEADER, x, 0}
65
66 #if defined(_MSC_VER)
67 #pragma section(".asmdef")
68 __declspec(allocate(".asmdef"))
69 #elif defined(__GNUC__)
70 __attribute__ ((section(".asmdef")))
71 #else
72 #error Your compiler is not supported.
73 #endif
74
75 ASMGENDATA Table[] =
76 {
77
78 /* PORTABLE CONSTANTS ********************************************************/
79 #include "ksx.template.h"
80
81 /* ARCHITECTURE SPECIFIC CONTSTANTS ******************************************/
82 #ifdef _M_IX86
83 #include "ks386.template.h"
84 #elif defined(_M_AMD64)
85 #include "ksamd64.template.h"
86 #endif
87
88 /* End of list */
89 {TYPE_END, "", 0}
90 };
91