Mercurial > repos > blastem
changeset 713:f9b80a78d9a6
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
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 17 May 2015 15:41:15 -0700 |
parents | 382a2b5b70c0 |
children | e29bc2918f69 |
files | m68k_core.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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; + } } }