Hi, Regarding all the comments on raising an exception. The real hardware does only support a few basic exception (like div by zero or interrupts and system calls). There is no checking if an instruction is supported or not. If an illegal opcode (like divu if the hardware divider is not enabled) is decoded, the behaviour is undefined.
Additionally, there are no privileged instructions, no distinction between kernel and userspace, no memory protection, the LM32 CPU targets to be a lightweight and relative fast softcore for FPGAs. There are many ways to kill the VM from 'userspace' (in real hardware and in my qemu port :) ) I treat QEMU as a tool to help developers writing software for this platform, rather than really running software inside a VM. That said, IMHO the best handling of unknown opcodes would be to kill the VM. -- Michael