diff m68k_to_x86.c @ 176:e2918b5208eb

Print a message when we try to run an invalid instruction, not when we try to translate it
author Mike Pavone <pavone@retrodev.com>
date Sun, 06 Jan 2013 21:42:57 -0800
parents 7504200cac86
children 09761d4391e1
line wrap: on
line diff
--- a/m68k_to_x86.c	Sun Jan 06 20:49:42 2013 -0800
+++ b/m68k_to_x86.c	Sun Jan 06 21:42:57 2013 -0800
@@ -42,6 +42,7 @@
 void m68k_native_addr();
 void m68k_native_addr_and_sync();
 void m68k_trap();
+void m68k_invalid();
 void set_sr();
 void set_ccr();
 void get_sr();
@@ -2532,6 +2533,9 @@
 		return translate_m68k_scc(dst, inst, opts);
 	} else if(inst->op == M68K_MOVEP) {
 		return translate_m68k_movep(dst, inst, opts);
+	} else if(inst->op == M68K_INVALID) {
+		dst = mov_ir(dst, inst->address, SCRATCH1, SZ_D);
+		return call(dst, (uint8_t *)m68k_invalid);
 	}
 	x86_ea src_op, dst_op;
 	if (inst->src.addr_mode != MODE_UNUSED) {
@@ -3468,8 +3472,6 @@
 		}
 		dst = add_ir(dst, 4, opts->aregs[7], SZ_D);
 		break;
-	/*case M68K_INVALID:
-		break;*/
 	default:
 		m68k_disasm(inst, disasm_buf);
 		printf("%X: %s\ninstruction %d not yet implemented\n", inst->address, disasm_buf, inst->op);