qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH-for-5.0?] target/mips/translate: Report exception in dela


From: Peter Maydell
Subject: Re: [RFC PATCH-for-5.0?] target/mips/translate: Report exception in delay slot as UNPREDICTABLE
Date: Tue, 7 Apr 2020 09:35:55 +0100

On Tue, 7 Apr 2020 at 00:55, Philippe Mathieu-Daudé <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]