# HG changeset patch # User Michael Pavone # Date 1417627801 28800 # Node ID 2d7e84ae818c9e0579849d807513f59264ee2a63 # Parent da52f7b72156d666a3c497a2cfa72b6ffd6f09fc Temporarily comment out code to translate Z80 instructions in place as in rare cases it can stomp the next instruction if a branch goes from a short from to a long one diff -r da52f7b72156 -r 2d7e84ae818c z80_to_x86.c --- a/z80_to_x86.c Wed Dec 03 09:26:07 2014 -0800 +++ b/z80_to_x86.c Wed Dec 03 09:30:01 2014 -0800 @@ -1871,6 +1871,7 @@ } deferred_addr * orig_deferred = opts->deferred; uint8_t * native_end = translate_z80inst(&instbuf, dst, context, address, 0); + /* if ((native_end - dst) <= orig_size) { uint8_t * native_next = z80_get_native_address(context, address + after-inst); if (native_next && ((native_next == orig_start + orig_size) || (orig_size - (native_end - dst)) > 5)) { @@ -1887,6 +1888,7 @@ return orig_start; } } + */ z80_map_native_address(context, address, dst, after-inst, ZMAX_NATIVE_SIZE); opts->cur_code = dst+ZMAX_NATIVE_SIZE; jmp(orig_start, dst);