Mercurial > repos > blastem
changeset 1182:2a799f24563f
Fix regression in tracking of 3+ byte instructions in Z80 core
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 18 Jan 2017 07:29:06 -0800 |
parents | 0928b68fef2a |
children | 8d8c71ebbbce |
files | z80_to_x86.c |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/z80_to_x86.c Tue Jan 17 19:01:13 2017 -0800 +++ b/z80_to_x86.c Wed Jan 18 07:29:06 2017 -0800 @@ -2915,8 +2915,6 @@ 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 @@ 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) {