25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: generate_head.c,v 1.5 2005/09/18 19:54:14 debug Exp $ |
* $Id: generate_head.c,v 1.8 2005/11/06 22:41:12 debug Exp $ |
29 |
*/ |
*/ |
30 |
|
|
31 |
#include <stdio.h> |
#include <stdio.h> |
103 |
"extern int old_show_trace_tree;\n" |
"extern int old_show_trace_tree;\n" |
104 |
"extern int old_instruction_trace;\n" |
"extern int old_instruction_trace;\n" |
105 |
"extern int old_quiet_mode;\n" |
"extern int old_quiet_mode;\n" |
106 |
|
"extern int show_opcode_statistics;\n" |
107 |
"extern int quiet_mode;\n"); |
"extern int quiet_mode;\n"); |
108 |
|
|
109 |
printf("\n/* instr uses the same names as in " |
printf("\n/* instr uses the same names as in " |
113 |
"#define instr32(n) %s32_instr_ ## n\n\n", a); |
"#define instr32(n) %s32_instr_ ## n\n\n", a); |
114 |
printf("#endif\n\n"); |
printf("#endif\n\n"); |
115 |
|
|
116 |
printf("/* This is for marking a physical page as containing " |
printf("/* This is for marking a physical page as containing" |
117 |
"translated or\n combined instructions, respectively: */\n"); |
"\n combined instructions: */\n"); |
|
printf("#define translated (cpu->cd.%s.cur_physpage->flags " |
|
|
"|= TRANSLATIONS)\n", a); |
|
118 |
printf("#define combined (cpu->cd.%s.cur_physpage->flags " |
printf("#define combined (cpu->cd.%s.cur_physpage->flags " |
119 |
"|= COMBINATIONS)\n", a); |
"|= COMBINATIONS)\n", a); |
120 |
|
|
138 |
/* TODO: solve this in a nicer way! */ |
/* TODO: solve this in a nicer way! */ |
139 |
if (strcmp(a, "avr") == 0) |
if (strcmp(a, "avr") == 0) |
140 |
printf("static struct %s_instr_call nothing_call = { " |
printf("static struct %s_instr_call nothing_call = { " |
141 |
"instr(nothing), {0,0} };\n", a); |
"instr(nothing), 0, {0,0} };\n", a); |
142 |
else |
else { |
143 |
|
printf("#ifdef DYNTRANS_VARIABLE_INSTRUCTION_LENGTH\n"); |
144 |
|
printf("static struct %s_instr_call nothing_call = { " |
145 |
|
"instr(nothing), 0, {0,0,0} };\n", a); |
146 |
|
printf("#else\n"); |
147 |
printf("static struct %s_instr_call nothing_call = { " |
printf("static struct %s_instr_call nothing_call = { " |
148 |
"instr(nothing), {0,0,0} };\n", a); |
"instr(nothing), {0,0,0} };\n", a); |
149 |
|
printf("#endif\n"); |
150 |
|
} |
151 |
|
|
152 |
printf("\n"); |
printf("\n"); |
153 |
|
|