dtpic.mui: added MUI4 attributes. (Only attribute
[AROS.git] / arch / .unmaintained / m68k-emul / geninc.c
blobd9297cf892645923019dd5b975fe4041ef9f6b6c
1 /*
2 Copyright © 1995-2011, 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"
17 #define FuncOffset(x) (int)__AROS_GETJUMPVEC(0,x)
19 int main (void)
21 printf ("/* Macros */\n"
22 "#define AROS_CSYMNAME(n) n\n"
23 "#define AROS_CDEFNAME(n) n\n"
24 "#define AROS_SLIB_ENTRY(n,s) s ## _ ## n\n"
25 "\n");
27 printf ("/* ExecBase */\n");
28 printf ("#define AttnResched %d\n", offsetof (struct ExecBase, AttnResched));
29 printf ("#define IDNestCnt %d\n", offsetof (struct ExecBase, IDNestCnt));
30 printf ("#define TDNestCnt %d\n", offsetof (struct ExecBase, TDNestCnt));
31 printf ("#define TaskReady %d\n", offsetof (struct ExecBase, TaskReady));
32 printf ("#define ThisTask %d\n", offsetof (struct ExecBase, ThisTask));
33 printf ("#define SysFlags %d\n", offsetof (struct ExecBase, SysFlags));
35 printf ("\n/* struct Task */\n");
36 printf ("#define tc_State %d\n", offsetof (struct Task, tc_State));
37 printf ("#define tc_Flags %d\n", offsetof (struct Task, tc_Flags));
38 printf ("#define tc_ExceptCode %d\n", offsetof (struct Task, tc_ExceptCode));
39 printf ("#define tc_ExceptData %d\n", offsetof (struct Task, tc_ExceptData));
40 printf ("#define tc_SigExcept %d\n", offsetof (struct Task, tc_SigExcept));
41 printf ("#define tc_SigRecvd %d\n", offsetof (struct Task, tc_SigRecvd));
42 printf ("#define tc_Launch %d\n", offsetof (struct Task, tc_Launch));
43 printf ("#define tc_Switch %d\n", offsetof (struct Task, tc_Switch));
44 printf ("#define tc_SPReg %d\n", offsetof (struct Task, tc_SPReg));
45 printf ("#define tc_SPLower %d\n", offsetof (struct Task, tc_SPLower));
46 printf ("#define tc_SPUpper %d\n", offsetof (struct Task, tc_SPUpper));
47 printf ("#define tc_IDNestCnt %d\n", offsetof (struct Task, tc_IDNestCnt));
48 printf ("#define tc_UnionETask %d\n", offsetof (struct Task, tc_UnionETask));
50 printf ("\n/* struct DosBase */\n");
51 printf ("#define dl_SysBase %d\n", offsetof (struct DosLibrary, dl_SysBase));
53 printf ("\n/* struct StackSwapStruct */\n");
54 printf ("#define stk_Lower %d\n", offsetof (struct StackSwapStruct, stk_Lower));
55 printf ("#define stk_Upper %d\n", offsetof (struct StackSwapStruct, stk_Upper));
56 printf ("#define stk_Pointer %d\n", offsetof (struct StackSwapStruct, stk_Pointer));
58 printf ("\n/* struct sigcontext_struct */\n");
59 printf ("#define sc_mask %d\n", offsetof (struct sigcontext_struct, sc_mask));
60 printf ("#define sc_usp %d\n", offsetof (struct sigcontext_struct, sc_usp));
61 printf ("#define sc_d0 %d\n", offsetof (struct sigcontext_struct, sc_d0));
62 printf ("#define sc_d1 %d\n", offsetof (struct sigcontext_struct, sc_d1));
63 printf ("#define sc_a0 %d\n", offsetof (struct sigcontext_struct, sc_a0));
64 printf ("#define sc_a1 %d\n", offsetof (struct sigcontext_struct, sc_a1));
65 printf ("#define sc_sr %d\n", offsetof (struct sigcontext_struct, sc_sr));
66 printf ("#define sc_pc %d\n", offsetof (struct sigcontext_struct, sc_pc));
67 printf ("#define sc_formatvec %d\n", offsetof (struct sigcontext_struct, sc_formatvec));
69 printf ("\n/* Task Flags */\n");
70 printf ("#define TS_RUN %d\n", TS_RUN);
71 printf ("#define TS_READY %d\n", TS_READY);
72 printf ("#define TF_EXCEPT 0x%04lX\n", TF_EXCEPT);
73 printf ("#define TF_SWITCH 0x%04lX\n", TF_SWITCH);
75 printf ("#define TB_EXCEPT %d\n", TB_EXCEPT);
76 printf ("#define TB_SWITCH %d\n", TB_SWITCH);
77 printf ("#define TB_LAUNCH %d\n", TB_LAUNCH);
79 printf ("\n/* Exec functions */\n");
80 printf ("#define Switch %d\n", FuncOffset (9));
81 printf ("#define Dispatch %d\n", FuncOffset (10));
82 printf ("#define Exception %d\n", FuncOffset (11));
83 printf ("#define Alert %d\n", FuncOffset (18));
84 printf ("#define Disable %d\n", FuncOffset (20));
85 printf ("#define Enable %d\n", FuncOffset (21));
86 printf ("#define Enqueue %d\n", FuncOffset (45));
87 printf ("#define StackSwap %d\n", FuncOffset (122));
89 printf ("\n/* Constants */\n");
90 printf ("#define AT_DeadEnd 0x%08X\n", AT_DeadEnd);
91 printf ("#define AN_StackProbe 0x%08X\n", AN_StackProbe);
93 #ifdef UseExecstubs
94 printf ("#define UseExecstubs 1\n");
95 #endif
96 return 0;