diff options
author | Michael Pavone <pavone@retrodev.com> | 2017-01-18 07:29:06 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2017-01-18 07:29:06 -0800 |
commit | 76b0889c96abcf18ff6eab509b4aceaaa6ecc207 (patch) | |
tree | 90e207d2d4f3e3d65b8c8748eb2ef830914632f3 /z80_to_x86.c | |
parent | 28b6a8123b3ba757f84a7c32c3d579f684d7d5b4 (diff) |
Fix regression in tracking of 3+ byte instructions in Z80 core
Diffstat (limited to 'z80_to_x86.c')
-rw-r--r-- | z80_to_x86.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/z80_to_x86.c b/z80_to_x86.c index 5b5124a..f43aa56 100644 --- a/z80_to_x86.c +++ b/z80_to_x86.c @@ -2915,8 +2915,6 @@ uint8_t z80_get_native_inst_size(z80_options * opts, uint32_t address) void z80_map_native_address(z80_context * context, uint32_t address, uint8_t * native_address, uint8_t size, uint8_t native_size) { - uint32_t orig_address = address; - z80_options * opts = context->options; uint32_t meta_off; memmap_chunk const *mem_chunk = find_map_chunk(address, &opts->gen, MMAP_CODE, &meta_off); @@ -2950,7 +2948,7 @@ void z80_map_native_address(z80_context * context, uint32_t address, uint8_t * n memset(map->offsets, 0xFF, sizeof(int32_t) * NATIVE_CHUNK_SIZE); } map->offsets[address % NATIVE_CHUNK_SIZE] = native_address - map->base; - for(--size, address++; size; --size, orig_address++) { + for(--size, address++; size; --size, address++) { address &= opts->gen.address_mask; map = opts->gen.native_code_map + address / NATIVE_CHUNK_SIZE; if (!map->base) { |