Mercurial > repos > blastem
diff z80_to_x86.c @ 644:2d7e84ae818c
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
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 03 Dec 2014 09:30:01 -0800 |
parents | 041578693329 |
children | 103d5cabbe14 |
line wrap: on
line diff
--- 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);