Updated PCI IDs to latest snapshot.
[tangerine.git] / arch / .unmaintained / m68k-emul / geninc.c
blob72bc516b86082352d3eb8dc99bfd10070f2b74a8
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <sys/types.h>
7 #include <stdio.h>
8 #include <stddef.h>
9 #include <exec/alerts.h>
10 #include <exec/types.h>
11 #include <exec/execbase.h>
12 #include <exec/tasks.h>
13 #include <dos/dosextens.h>
14 #include <asm/sigcontext.h>
15 #include "machine.h"
16 #include "etask.h"
18 #define FuncOffset(x) (int)__AROS_GETJUMPVEC(0,x)
20 int main (void)
22 printf ("/* Macros */\n"
23 "#define AROS_CSYMNAME(n) n\n"
24 "#define AROS_CDEFNAME(n) n\n"
25 "#define AROS_SLIB_ENTRY(n,s) s ## _ ## n\n"
26 "\n");
28 printf ("/* ExecBase */\n");
29 printf ("#define AttnResched %d\n", offsetof (struct ExecBase, AttnResched));
30 printf ("#define IDNestCnt %d\n", offsetof (struct ExecBase, IDNestCnt));
31 printf ("#define TDNestCnt %d\n", offsetof (struct ExecBase, TDNestCnt));
32 printf ("#define TaskReady %d\n", offsetof (struct ExecBase, TaskReady));
33 printf ("#define ThisTask %d\n", offsetof (struct ExecBase, ThisTask));
34 printf ("#define SysFlags %d\n", offsetof (struct ExecBase, SysFlags));
36 printf ("\n/* struct Task */\n");
37 printf ("#define tc_State %d\n", offsetof (struct Task, tc_State));
38 printf ("#define tc_Flags %d\n", offsetof (struct Task, tc_Flags));
39 printf ("#define tc_ExceptCode %d\n", offsetof (struct Task, tc_ExceptCode));
40 printf ("#define tc_ExceptData %d\n", offsetof (struct Task, tc_ExceptData));
41 printf ("#define tc_SigExcept %d\n", offsetof (struct Task, tc_SigExcept));
42 printf ("#define tc_SigRecvd %d\n", offsetof (struct Task, tc_SigRecvd));
43 printf ("#define tc_Launch %d\n", offsetof (struct Task, tc_Launch));
44 printf ("#define tc_Switch %d\n", offsetof (struct Task, tc_Switch));
45 printf ("#define tc_SPReg %d\n", offsetof (struct Task, tc_SPReg));
46 printf ("#define tc_SPLower %d\n", offsetof (struct Task, tc_SPLower));
47 printf ("#define tc_SPUpper %d\n", offsetof (struct Task, tc_SPUpper));
48 printf ("#define tc_IDNestCnt %d\n", offsetof (struct Task, tc_IDNestCnt));
49 printf ("#define tc_UnionETask %d\n", offsetof (struct Task, tc_UnionETask));
51 printf ("\n/* struct DosBase */\n");
52 printf ("#define dl_SysBase %d\n", offsetof (struct DosLibrary, dl_SysBase));
54 printf ("\n/* struct StackSwapStruct */\n");
55 printf ("#define stk_Lower %d\n", offsetof (struct StackSwapStruct, stk_Lower));
56 printf ("#define stk_Upper %d\n", offsetof (struct StackSwapStruct, stk_Upper));
57 printf ("#define stk_Pointer %d\n", offsetof (struct StackSwapStruct, stk_Pointer));
59 printf ("\n/* struct sigcontext_struct */\n");
60 printf ("#define sc_mask %d\n", offsetof (struct sigcontext_struct, sc_mask));
61 printf ("#define sc_usp %d\n", offsetof (struct sigcontext_struct, sc_usp));
62 printf ("#define sc_d0 %d\n", offsetof (struct sigcontext_struct, sc_d0));
63 printf ("#define sc_d1 %d\n", offsetof (struct sigcontext_struct, sc_d1));
64 printf ("#define sc_a0 %d\n", offsetof (struct sigcontext_struct, sc_a0));
65 printf ("#define sc_a1 %d\n", offsetof (struct sigcontext_struct, sc_a1));
66 printf ("#define sc_sr %d\n", offsetof (struct sigcontext_struct, sc_sr));
67 printf ("#define sc_pc %d\n", offsetof (struct sigcontext_struct, sc_pc));
68 printf ("#define sc_formatvec %d\n", offsetof (struct sigcontext_struct, sc_formatvec));
70 printf ("\n/* struct IntETask */\n");
71 printf ("#define iet_Context %d\n", offsetof (struct IntETask, iet_Context));
73 printf ("\n/* Task Flags */\n");
74 printf ("#define TS_RUN %d\n", TS_RUN);
75 printf ("#define TS_READY %d\n", TS_READY);
76 printf ("#define TF_EXCEPT 0x%04lX\n", TF_EXCEPT);
77 printf ("#define TF_SWITCH 0x%04lX\n", TF_SWITCH);
79 printf ("#define TB_EXCEPT %d\n", TB_EXCEPT);
80 printf ("#define TB_SWITCH %d\n", TB_SWITCH);
81 printf ("#define TB_LAUNCH %d\n", TB_LAUNCH);
83 printf ("\n/* Exec functions */\n");
84 printf ("#define Switch %d\n", FuncOffset (9));
85 printf ("#define Dispatch %d\n", FuncOffset (10));
86 printf ("#define Exception %d\n", FuncOffset (11));
87 printf ("#define Alert %d\n", FuncOffset (18));
88 printf ("#define Disable %d\n", FuncOffset (20));
89 printf ("#define Enable %d\n", FuncOffset (21));
90 printf ("#define Enqueue %d\n", FuncOffset (45));
91 printf ("#define StackSwap %d\n", FuncOffset (122));
93 printf ("\n/* Constants */\n");
94 printf ("#define AT_DeadEnd 0x%08X\n", AT_DeadEnd);
95 printf ("#define AN_StackProbe 0x%08X\n", AN_StackProbe);
97 #ifdef UseExecstubs
98 printf ("#define UseExecstubs 1\n");
99 #endif
100 return 0;