# HG changeset patch # User Michael Pavone # Date 1431902475 25200 # Node ID f9b80a78d9a62ec0982061aa2e1bb247dad2b337 # Parent 382a2b5b70c05aea5e6d632cd86ec74ddb6603d4 Don't overwrite an instruction offset mapping with an extension word value. I really need the ability for a word to be mapped to more than one instruction, but this will be more correct for now diff -r 382a2b5b70c0 -r f9b80a78d9a6 m68k_core.c --- a/m68k_core.c Sun May 17 15:40:31 2015 -0700 +++ b/m68k_core.c Sun May 17 15:41:15 2015 -0700 @@ -643,7 +643,10 @@ native_code_map[chunk].offsets = malloc(sizeof(int32_t) * NATIVE_CHUNK_SIZE); memset(native_code_map[chunk].offsets, 0xFF, sizeof(int32_t) * NATIVE_CHUNK_SIZE); } - native_code_map[chunk].offsets[offset] = EXTENSION_WORD; + if (native_code_map[chunk].offsets[offset] == INVALID_OFFSET) { + //TODO: Better handling of overlapping instructions + native_code_map[chunk].offsets[offset] = EXTENSION_WORD; + } } }