[ASM]
[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 <ntdef.h>
7 #include <ntifs.h>
8 #include <arc/arc.h>
9 #include <ntndk.h>
10 #include <bugcodes.h>
11
12 /* KD Support */
13 #define NOEXTAPI
14 #include <windbgkd.h>
15 #include <wdbgexts.h>
16 #include <kddll.h>
17
18 // FIXME: where to put this?
19 typedef struct _FIBER /* Field offsets: */
20 { /* 32 bit 64 bit */
21 /* this must be the first field */
22 PVOID Parameter; /* 0x00 0x00 */
23 struct _EXCEPTION_REGISTRATION_RECORD * ExceptionList; /* 0x04 0x08 */
24 PVOID StackBase; /* 0x08 0x10 */
25 PVOID StackLimit; /* 0x0C 0x18 */
26 PVOID DeallocationStack; /* 0x10 0x20 */
27 CONTEXT Context; /* 0x14 0x28 */
28 ULONG GuaranteedStackBytes; /* 0x2E0 */
29 PVOID FlsData; /* 0x2E4 */
30 PVOID ActivationContextStack; /* 0x2E8 */
31 } FIBER, *PFIBER;
32
33 typedef struct
34 {
35 char Type;
36 char Name[55];
37 ULONGLONG Value;
38 } ASMGENDATA;
39
40 #define TYPE_END 0
41 #define TYPE_RAW 1
42 #define TYPE_CONSTANT 2
43 #define TYPE_HEADER 3
44
45 #define RAW(x) {TYPE_RAW, x, 0}
46 #define CONSTANT(name) {TYPE_CONSTANT, #name, (ULONG)name}
47 #define CONSTANT64(name) {TYPE_CONSTANT, #name, (ULONGLONG)name}
48 #define CONSTANTPTR(name) {TYPE_CONSTANT, #name, (ULONG_PTR)name}
49 #define CONSTANTX(name, value) {TYPE_CONSTANT, #name, value}
50 #define OFFSET(name, struct, member) {TYPE_CONSTANT, #name, FIELD_OFFSET(struct, member)}
51 #define RELOFFSET(name, struct, member, to) {TYPE_CONSTANT, #name, FIELD_OFFSET(struct, member) - FIELD_OFFSET(struct, to)}
52 #define SIZE(name, struct) {TYPE_CONSTANT, #name, sizeof(struct)}
53 #define HEADER(x) {TYPE_HEADER, x, 0}
54
55 #if defined(_MSC_VER)
56 #pragma section(".asmdef")
57 __declspec(allocate(".asmdef"))
58 #elif defined(__GNUC__)
59 __attribute__ ((section(".asmdef")))
60 #else
61 #error Your compiler is not supported.
62 #endif
63 ASMGENDATA Table[] =
64 {
65
66 /* PORTABLE CONSTANTS ********************************************************/
67 #include "ksx.template.h"
68
69 /* ARCHITECTURE SPECIFIC CONTSTANTS ******************************************/
70 #ifdef _M_IX86
71 #include "ks386.template.h"
72 #elif defined(_M_AMD64)
73 #include "ksamd64.template.h"
74 #endif
75
76 /* End of list */
77 {TYPE_END, "", 0}
78 };
79
80 LONG NTAPI DummyEntry(HANDLE hinstDLL, ULONG fdwReason, PVOID lpvReserved)
81 {
82 return 0;
83 }