# HG changeset patch # User Michael Pavone # Date 1475813518 25200 # Node ID 193db42e702bc6d9a570b4ce89f537d907686de6 # Parent f6e998227300af4af01d4284e22aece7e2ca8eb6 Remove hacky assumption about Genesis memory map in M68K core diff -r f6e998227300 -r 193db42e702b backend_x86.c --- a/backend_x86.c Thu Oct 06 09:35:35 2016 -0700 +++ b/backend_x86.c Thu Oct 06 21:11:58 2016 -0700 @@ -224,6 +224,9 @@ } code_ptr not_code = code->cur + 1; jcc(code, CC_NC, code->cur + 2); + if (memmap[chunk].mask != opts->address_mask) { + or_ir(code, memmap[chunk].start, opts->scratch1, opts->address_size); + } call(code, opts->save_context); call_args(code, opts->handle_code_write, 2, opts->scratch2, opts->context_reg); mov_rr(code, RAX, opts->context_reg, SZ_PTR); diff -r f6e998227300 -r 193db42e702b m68k_core_x86.c --- a/m68k_core_x86.c Thu Oct 06 09:35:35 2016 -0700 +++ b/m68k_core_x86.c Thu Oct 06 21:11:58 2016 -0700 @@ -2267,7 +2267,7 @@ { m68k_options * options = context->options; //TODO: Modify gen_mem_fun so that it passes the raw address instead of the masked one, then remove the OR below - uint32_t inst_start = get_instruction_start(options, context->native_code_map, address | 0xE00000); + uint32_t inst_start = get_instruction_start(options, context->native_code_map, address); if (inst_start) { code_info *code = &options->gen.code; code_ptr dst = get_native_address(context->options, inst_start);