From: Christophe Lyon <christophe.lyon@st.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] Support saturation with shift=0.
Date: Thu, 20 Jan 2011 13:06:40 +0100 [thread overview]
Message-ID: <4D382550.1080708@st.com> (raw)
In-Reply-To: <AANLkTikUzZGtUJWXJ17Uarm1HWpkRNkFts4kKAwmXpj9@mail.gmail.com>
On 19.01.2011 17:51, Peter Maydell wrote:
> On 19 January 2011 16:10, Christophe Lyon <christophe.lyon@st.com> 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 <christophe.lyon@st.com>
>
> Checked against the ARM ARM and tested by
> random-instruction-sequence generation.
>
Thanks.
next prev parent reply other threads:[~2011-01-20 12:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 16:10 [Qemu-devel] [PATCH] Support saturation with shift=0 Christophe Lyon
2011-01-19 16:51 ` Peter Maydell
2011-01-20 12:06 ` Christophe Lyon [this message]
2011-01-20 12:15 ` Peter Maydell
2011-01-26 13:33 ` Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D382550.1080708@st.com \
--to=christophe.lyon@st.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.