changeset 2242:31fc1186ffbb

Use translate_out_of_bounds rather than defer_translation for addresses that lack native code size metadata
author Michael Pavone <pavone@retrodev.com>
date Sun, 30 Oct 2022 12:04:29 -0700
parents 48f718126099
children e6bad7bd8751
files m68k_core.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/m68k_core.c	Sat Oct 01 14:27:29 2022 -0700
+++ b/m68k_core.c	Sun Oct 30 12:04:29 2022 -0700
@@ -1037,14 +1037,18 @@
 			memmap_chunk const *chunk = find_map_chunk(address, &opts->gen, 0, NULL);
 			if (!chunk) {
 				code_ptr start = code->cur;
-				defer_translation(&opts->gen, address, opts->retrans_stub);
+				translate_out_of_bounds(opts, address);
 				code_ptr after = code->cur;
 				map_native_address(context, address, start, 2, after-start);
 				break;
 			}
 			if (!(chunk->flags & MMAP_READ)) {
 				code_ptr start = code->cur;
-				defer_translation(&opts->gen, address, opts->retrans_stub);
+				if (chunk->flags & MMAP_CODE) {
+					defer_translation(&opts->gen, address, opts->retrans_stub);
+				} else {
+					translate_out_of_bounds(opts, address);
+				}
 				code_ptr after = code->cur;
 				map_native_address(context, address, start, 2, after-start);
 				break;