comparison m68k_core_x86.c @ 2086:973a39d93d7b

Fix instruction retranslation for write protectable region of SCD Program RAM
author Michael Pavone <pavone@retrodev.com>
date Sat, 05 Feb 2022 16:41:01 -0800
parents 8ee7ecbf3f21
children 17ecd28ddc8a
comparison
equal deleted inserted replaced
2085:1ff67ce37085 2086:973a39d93d7b
2505 2505
2506 void m68k_invalidate_code_range(m68k_context *context, uint32_t start, uint32_t end) 2506 void m68k_invalidate_code_range(m68k_context *context, uint32_t start, uint32_t end)
2507 { 2507 {
2508 m68k_options *opts = context->options; 2508 m68k_options *opts = context->options;
2509 native_map_slot *native_code_map = opts->gen.native_code_map; 2509 native_map_slot *native_code_map = opts->gen.native_code_map;
2510 start -= M68K_MAX_INST_SIZE - 2;
2510 memmap_chunk const *mem_chunk = find_map_chunk(start, &opts->gen, 0, NULL); 2511 memmap_chunk const *mem_chunk = find_map_chunk(start, &opts->gen, 0, NULL);
2511 if (mem_chunk) { 2512 if (mem_chunk) {
2512 //calculate the lowest alias for this address 2513 //calculate the lowest alias for this address
2513 start = mem_chunk->start + ((start - mem_chunk->start) & mem_chunk->mask); 2514 start = mem_chunk->start + ((start - mem_chunk->start) & mem_chunk->mask);
2514 } 2515 }