summaryrefslogtreecommitdiff
path: root/z80_to_x86.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2014-12-03 09:30:01 -0800
committerMichael Pavone <pavone@retrodev.com>2014-12-03 09:30:01 -0800
commit5b1f68b82cda5b444fa2168d9b24b7101ba4b434 (patch)
tree367c666e68eb51db7e012165ac51a6e8ed108ef6 /z80_to_x86.c
parent1a37b36e7285a87e49c00f12f746d80a36041e59 (diff)
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
Diffstat (limited to 'z80_to_x86.c')
-rw-r--r--z80_to_x86.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/z80_to_x86.c b/z80_to_x86.c
index c46bed8..dc6cfaf 100644
--- a/z80_to_x86.c
+++ b/z80_to_x86.c
@@ -1871,6 +1871,7 @@ void * z80_retranslate_inst(uint32_t address, z80_context * context, uint8_t * o
}
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 @@ void * z80_retranslate_inst(uint32_t address, z80_context * context, uint8_t * o
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);