qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] target-mips/translate.c: Add judgement for


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 2/2] target-mips/translate.c: Add judgement for msb and lsb
Date: Mon, 28 Jul 2014 23:01:02 +0100

On 28 July 2014 22:42, Aurelien Jarno <address@hidden> wrote:
> On Mon, Jul 28, 2014 at 11:58:22PM +0800, Dongxue Zhang wrote:
>> Use 'if' to make sure the real msb greater than the lsb. As the compiler may
>> not do this.
>
> What are you trying to fix exactly? These cases are defined as
> "unpredictable" in the MIPS ISA manual, which is what is implemented in
> QEMU.

This may be true, but the TCG README doesn't define negative
lengths as being "unspecified behaviour" (ie guaranteed to at
least not crash even if the result isn't specified), and in fact the
implementation of tcg_gen_deposit will assert on negative lengths.
We shouldn't implement guest unpredictable cases as "crash QEMU".

thanks
-- PMM



reply via email to

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