--- uae/src/gencpu.c 2018/04/24 16:59:53 1.1.1.14 +++ uae/src/gencpu.c 2018/04/24 17:05:21 1.1.1.16 @@ -22,8 +22,6 @@ #include "sysdeps.h" #include -#include "config.h" -#include "options.h" #include "readcpu.h" #define BOOL_TYPE "int" @@ -40,11 +38,6 @@ static int cpu_level; * 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; @@ -204,7 +197,7 @@ static void sync_m68k_pc (void) printf ("m68k_incpc(%d);\n", m68k_pc_offset); switch (m68k_pc_offset) { case 0: - /*fprintf (stderr, "refilling prefetch at 0\n"); */ + /*write_log ("refilling prefetch at 0\n"); */ break; case 2: fill_prefetch_2 (); @@ -455,7 +448,7 @@ static void genastore (char *from, amode case Areg: switch (size) { case sz_word: - fprintf (stderr, "Foo\n"); + write_log ("Foo\n"); printf ("\tm68k_areg(regs, %s) = (uae_s32)(uae_s16)(%s);\n", reg, from); break; case sz_long: @@ -2026,6 +2019,8 @@ static void gen_opcode (unsigned long in break; case i_BFINS: printf ("\ttmp = m68k_dreg(regs, (extra >> 12) & 7);\n"); + printf ("\tSET_NFLG (tmp & (1 << (width - 1)) ? 1 : 0);\n"); + printf ("\tSET_ZFLG (tmp == 0);\n"); break; default: break;