Mercurial > repos > blastem
comparison m68k_core.c @ 2512:9df8dec435b7
Fix dynarec 68K instruction size metadata edge case bug
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 29 Aug 2024 22:14:33 -0700 |
parents | d74d3998482c |
children | 7e86ec94c899 |
comparison
equal
deleted
inserted
replaced
2511:e51b1fc0e37f | 2512:9df8dec435b7 |
---|---|
1276 return native_start; | 1276 return native_start; |
1277 } else { | 1277 } else { |
1278 code_info tmp = *code; | 1278 code_info tmp = *code; |
1279 *code = orig_code; | 1279 *code = orig_code; |
1280 translate_m68k(context, &instbuf); | 1280 translate_m68k(context, &instbuf); |
1281 // 68K instruction may not be the same size as the one when we initial switched to a new native address | |
1282 map_native_address(context, instbuf.address, orig_start, after_address - orig, MAX_NATIVE_SIZE); | |
1281 orig_code = *code; | 1283 orig_code = *code; |
1282 *code = tmp; | 1284 *code = tmp; |
1283 if (!m68k_is_terminal(&instbuf)) { | 1285 if (!m68k_is_terminal(&instbuf)) { |
1284 jmp(&orig_code, get_native_address_trans(context, after_address)); | 1286 jmp(&orig_code, get_native_address_trans(context, after_address)); |
1285 } | 1287 } |