25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: generate_head.c,v 1.15 2006/04/19 18:55:57 debug Exp $ |
* $Id: generate_head.c,v 1.18 2006/07/20 21:53:00 debug Exp $ |
29 |
*/ |
*/ |
30 |
|
|
31 |
#include <stdio.h> |
#include <stdio.h> |
71 |
|
|
72 |
printf("\n/* AUTOMATICALLY GENERATED! Do not edit. */\n\n"); |
printf("\n/* AUTOMATICALLY GENERATED! Do not edit. */\n\n"); |
73 |
|
|
74 |
|
printf("#include <assert.h>\n"); |
75 |
|
printf("#include \"debugger.h\"\n"); |
76 |
|
|
77 |
printf("#define DYNTRANS_MAX_VPH_TLB_ENTRIES " |
printf("#define DYNTRANS_MAX_VPH_TLB_ENTRIES " |
78 |
"%s_MAX_VPH_TLB_ENTRIES\n", uppercase(a)); |
"%s_MAX_VPH_TLB_ENTRIES\n", uppercase(a)); |
79 |
printf("#define DYNTRANS_ARCH %s\n", a); |
printf("#define DYNTRANS_ARCH %s\n", a); |
153 |
printf("\tcpu->cd.%s.next_ic --;\n", a); |
printf("\tcpu->cd.%s.next_ic --;\n", a); |
154 |
printf("}\n\n"); |
printf("}\n\n"); |
155 |
|
|
156 |
printf("#ifdef DYNTRANS_VARIABLE_INSTRUCTION_LENGTH\n"); |
/* Ugly special hack for Transputer: */ |
157 |
printf("static struct %s_instr_call nothing_call = { " |
if (strcasecmp(argv[1], "transputer") == 0) { |
158 |
"instr(nothing), {0,0,0} };\n", a); |
printf("static struct %s_instr_call nothing_call = { " |
159 |
printf("#else\n"); |
"instr(nothing), {0} };\n", a); |
160 |
printf("static struct %s_instr_call nothing_call = { " |
} else { |
161 |
"instr(nothing), {0,0,0} };\n", a); |
printf("static struct %s_instr_call nothing_call = { " |
162 |
printf("#endif\n"); |
"instr(nothing), {0,0,0} };\n", a); |
163 |
|
} |
164 |
|
|
165 |
printf("\n"); |
printf("\n"); |
166 |
|
|