25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: generate_head.c,v 1.8 2005/11/06 22:41:12 debug Exp $ |
* $Id: generate_head.c,v 1.12 2005/12/31 15:48:04 debug Exp $ |
29 |
*/ |
*/ |
30 |
|
|
31 |
#include <stdio.h> |
#include <stdio.h> |
36 |
char *uppercase(char *l) |
char *uppercase(char *l) |
37 |
{ |
{ |
38 |
static char staticbuf[1000]; |
static char staticbuf[1000]; |
39 |
int i = 0; |
size_t i = 0; |
40 |
|
|
41 |
while (*l && i < sizeof(staticbuf)) { |
while (*l && i < sizeof(staticbuf)) { |
42 |
char u = *l++; |
char u = *l++; |
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" |
"extern int show_opcode_statistics;\n" |
107 |
|
"extern int dyntrans_backend_enable;\n" |
108 |
"extern int quiet_mode;\n"); |
"extern int quiet_mode;\n"); |
109 |
|
|
110 |
printf("\n/* instr uses the same names as in " |
printf("\n/* instr uses the same names as in " |
136 |
printf("\tcpu->cd.%s.next_ic --;\n", a); |
printf("\tcpu->cd.%s.next_ic --;\n", a); |
137 |
printf("}\n\n"); |
printf("}\n\n"); |
138 |
|
|
139 |
/* TODO: solve this in a nicer way! */ |
printf("#ifdef DYNTRANS_VARIABLE_INSTRUCTION_LENGTH\n"); |
140 |
if (strcmp(a, "avr") == 0) |
printf("static struct %s_instr_call nothing_call = { " |
141 |
printf("static struct %s_instr_call nothing_call = { " |
"instr(nothing), {0,0,0} };\n", a); |
142 |
"instr(nothing), 0, {0,0} };\n", a); |
printf("#else\n"); |
143 |
else { |
printf("static struct %s_instr_call nothing_call = { " |
144 |
printf("#ifdef DYNTRANS_VARIABLE_INSTRUCTION_LENGTH\n"); |
"instr(nothing), {0,0,0} };\n", a); |
145 |
printf("static struct %s_instr_call nothing_call = { " |
printf("#endif\n"); |
|
"instr(nothing), 0, {0,0,0} };\n", a); |
|
|
printf("#else\n"); |
|
|
printf("static struct %s_instr_call nothing_call = { " |
|
|
"instr(nothing), {0,0,0} };\n", a); |
|
|
printf("#endif\n"); |
|
|
} |
|
146 |
|
|
147 |
printf("\n"); |
printf("\n"); |
148 |
|
|