From bb95ed38345859df9ac367c166c46a56e6f752e1 Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Sun, 6 Jan 2013 21:42:57 -0800 Subject: Print a message when we try to run an invalid instruction, not when we try to translate it --- runtime.S | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'runtime.S') diff --git a/runtime.S b/runtime.S index 140241f..73a09bf 100644 --- a/runtime.S +++ b/runtime.S @@ -88,6 +88,18 @@ already_supervisor_trap: call m68k_native_addr_and_sync add $24, %eax jmp *%rcx + +invalid_msg: + .asciz "Invalid instruction at %X\n" + + .global m68k_invalid +m68k_invalid: + lea invalid_msg(%rip), %rdi + mov %ecx, %esi + xor %rax, %rax + call printf + mov $1, %rdi + call exit int_dbg_msg: .asciz "Executing Interrupt!" -- cgit v1.2.3