# HG changeset patch # User Michael Pavone # Date 1495851499 25200 # Node ID b68732dcbf006261a74646a899accaef26a61360 # Parent 8f404b1fa572056746ba1a6886ff5a771a1e6ac8 Avoid splitting m68k_check_cycles_int_latch code across memory chunks since it expects a byte-sized jump offset. Avoid an unnecessary m68k_check_cycles_int_latch for register to register moves diff -r 8f404b1fa572 -r b68732dcbf00 m68k_core_x86.c --- a/m68k_core_x86.c Tue May 23 23:47:40 2017 -0700 +++ b/m68k_core_x86.c Fri May 26 19:18:19 2017 -0700 @@ -353,6 +353,7 @@ void m68k_check_cycles_int_latch(m68k_options *opts) { code_info *code = &opts->gen.code; + check_alloc_code(code, 3*MAX_INST_LEN); uint8_t cc; if (opts->gen.limit < 0) { cmp_ir(code, 1, opts->gen.cycles, SZ_D); @@ -728,7 +729,7 @@ inc_amount = inst->extra.size == OPSIZE_WORD ? 2 : (inst->extra.size == OPSIZE_LONG ? 4 : (inst->dst.params.regs.pri == 7 ? 2 : 1)); addi_areg(opts, inc_amount, inst->dst.params.regs.pri); } - } else { + } else if (needs_int_latch) { m68k_check_cycles_int_latch(opts); }