--- hatari/src/uae-cpu/gencpu.c 2019/04/01 07:10:40 1.1.1.4 +++ hatari/src/uae-cpu/gencpu.c 2019/04/01 07:11:35 1.1.1.6 @@ -22,7 +22,7 @@ * This file is distributed under the GNU Public License, version 2 or at * your option any later version. Read the file gpl.txt for details. */ -static char rcsid[] = "Hatari $Id: gencpu.c,v 1.1.1.4 2019/04/01 07:10:40 root Exp $"; +char GenCpu_rcsid[] = "Hatari $Id: gencpu.c,v 1.1.1.6 2019/04/01 07:11:35 root Exp $"; #include #include @@ -46,17 +46,12 @@ char exactCpuCycles[256]; /* Space to * Initialized to -1 for each opcode. If it remains unchanged, indicates we * are done with that opcode. */ static int next_cpu_level; - -void write_log (const char *s, ...) -{ - fprintf (stderr, "%s", s); -} - static int *opcode_map; static int *opcode_next_clev; static int *opcode_last_postfix; static unsigned long *counts; + static void read_counts (void) { FILE *file; @@ -1351,7 +1346,6 @@ static void gen_opcode (unsigned long in insn_n_cycles = 20; break; case i_RTD: - printf ("\tcompiler_flush_jsr_stack();\n"); genamode (Aipi, "7", sz_long, "pc", 1, 0); genamode (curi->smode, "srcreg", curi->size, "offs", 1, 0); printf ("\tm68k_areg(regs, 7) += offs;\n"); @@ -1386,7 +1380,6 @@ static void gen_opcode (unsigned long in need_endlabel = 1; break; case i_RTR: - printf ("\tcompiler_flush_jsr_stack();\n"); printf ("\tMakeSR();\n"); genamode (Aipi, "7", sz_word, "sr", 1, 0); genamode (Aipi, "7", sz_long, "pc", 1, 0); @@ -1469,11 +1462,7 @@ static void gen_opcode (unsigned long in printf ("\t}\n"); need_endlabel = 1; } -#ifdef USE_COMPILER - printf ("\tm68k_setpc_bcc(m68k_getpc() + 2 + (uae_s32)src);\n"); -#else printf ("\tm68k_incpc ((uae_s32)src + 2);\n"); -#endif fill_prefetch_0 (); printf ("\treturn 10;\n"); printf ("didnt_jump:;\n"); @@ -1518,11 +1507,7 @@ static void gen_opcode (unsigned long in printf ("\t\t}\n"); need_endlabel = 1; } -#ifdef USE_COMPILER - printf ("\t\t\tm68k_setpc_bcc(m68k_getpc() + (uae_s32)offs + 2);\n"); -#else printf ("\t\t\tm68k_incpc((uae_s32)offs + 2);\n"); -#endif fill_prefetch_0 (); printf ("\t\t\treturn 10;\n"); printf ("\t\t} else {\n\t\t\t"); @@ -2404,7 +2389,6 @@ static void generate_includes (FILE * f) fprintf (f, "#include \"maccess.h\"\n"); fprintf (f, "#include \"memory.h\"\n"); fprintf (f, "#include \"newcpu.h\"\n"); - fprintf (f, "#include \"compiler.h\"\n"); fprintf (f, "#include \"cputbl.h\"\n"); fprintf (f, "#define CPUFUNC(x) x##_ff\n" "#ifdef NOFLAGS\n"