--- trunk/src/cpus/generate_head.c 2007/10/08 16:19:11 18 +++ trunk/src/cpus/generate_head.c 2007/10/08 16:19:37 22 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: generate_head.c,v 1.7 2005/10/27 14:01:13 debug Exp $ + * $Id: generate_head.c,v 1.12 2005/12/31 15:48:04 debug Exp $ */ #include @@ -36,7 +36,7 @@ char *uppercase(char *l) { static char staticbuf[1000]; - int i = 0; + size_t i = 0; while (*l && i < sizeof(staticbuf)) { char u = *l++; @@ -104,6 +104,7 @@ "extern int old_instruction_trace;\n" "extern int old_quiet_mode;\n" "extern int show_opcode_statistics;\n" + "extern int dyntrans_backend_enable;\n" "extern int quiet_mode;\n"); printf("\n/* instr uses the same names as in " @@ -135,13 +136,13 @@ printf("\tcpu->cd.%s.next_ic --;\n", a); printf("}\n\n"); - /* TODO: solve this in a nicer way! */ - if (strcmp(a, "avr") == 0) - printf("static struct %s_instr_call nothing_call = { " - "instr(nothing), {0,0} };\n", a); - else - printf("static struct %s_instr_call nothing_call = { " - "instr(nothing), {0,0,0} };\n", a); + printf("#ifdef DYNTRANS_VARIABLE_INSTRUCTION_LENGTH\n"); + printf("static struct %s_instr_call nothing_call = { " + "instr(nothing), {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"); printf("\n");