[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Support saturation with shift=0.
From: |
Christophe Lyon |
Subject: |
Re: [Qemu-devel] [PATCH] Support saturation with shift=0. |
Date: |
Thu, 20 Jan 2011 13:06:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 |
On 19.01.2011 17:51, Peter Maydell wrote:
> On 19 January 2011 16:10, Christophe Lyon <address@hidden> wrote:
>>
>> This patch fixes corner-case saturations, when the target range is
>> zero. It merely removes the guard against (sh == 0), and makes:
>> __ssat(0x87654321, 1) return 0xffffffff and set the saturation flag
>
> did you mean __ssat(0x87654321, 0) here? (they give the same
> result, of course, but it's the sh==0 case the patch is changing...)
Well... the ARM ARM says that the position for saturation is in the range 1 to
32, so I think the assembler encodes 1 less than what the user actually wrote.
Hence at user level we use '1', but '0' is encoded and then parsed by qemu. Am
I wrong?
Obviously, I can rephrase the commit message :-)
>
>> __usat(0x87654321, 0) return 0 and set the saturation flag
>>
>> Signed-off-by: Christophe Lyon <address@hidden>
>
> Checked against the ARM ARM and tested by
> random-instruction-sequence generation.
>
Thanks.