On Tue, 7 Apr 2020 at 00:55, Philippe Mathieu-Daudé <f4...@amsat.org> wrote: > > Using the BC1ANY4F instruction with a 24Kf core (MIPS32R2 > & ASE_MIPS16) we get: > > $ echo -ne '\x03\x20\xf8\x09EEEE' > cop1x.bin > $ qemu-system-mipsel -bios cop1x.bin > unknown branch 0x13000 > Aborted (core dumped)
> This is because this COP1X instruction generates a Reserved > Instruction when used with this core, however we are in a delay > slot, and exceptions in delay slot are architecturally unpredictable. > > Core dumps confunse users. Instead, report a friendlier error message: > > $ qemu-system-mipsel -bios cop1x.bin > qemu-system-mipsel: Exception in delay slot is UNPREDICTABLE UNPREDICTABLE behaviour should not in QEMU include causing QEMU to exit. You can log it with LOG_GUEST_ERROR if you like but you should do something plausible (ideally what some bit of real hardware does when this situation happens). PS: does MIPS use the "UNPREDICTABLE" terminology? I thought it was an Arm-ism, but maybe it's caught on more widely. thanks -- PMM