From: Peter Maydell <peter.maydell@linaro.org>
To: Christophe Lyon <christophe.lyon@st.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] rsqrte_f32: No need to copy sign bit.
Date: Mon, 10 Oct 2011 13:26:40 +0100	[thread overview]
Message-ID: <CAFEAcA9fcqFcq6+cbM9i2PvapWkvn_KXST8GDaBJA=ATQPpt_g@mail.gmail.com> (raw)
In-Reply-To: <4E92D66C.1060903@st.com>
On 10 October 2011 12:26, Christophe Lyon <christophe.lyon@st.com> wrote:
> On 09.10.2011 00:57, Peter Maydell wrote:
>> So we weren't generating incorrect results, we were just doing
>> slightly more work than we really needed, right? I'm curious
>> what prompted this patch :-)
>>
> Exactly. And no way to expose a bug :-(
If we always generate the correct results for all inputs, then
by definition it's not a bug. It's just a slightly suboptimal
calculation (both here and in the ARM ARM pseudocode).
> I was reading 2 revisions of the ARM ARM, and noticed erratas in the
> descriptions of FPRecipEstimate and FPRSqrtEstimate.
>
> Sign propagation has been removed in the former, and not in the later, so I
> re-read both functions carefully as well as qemu's implementation and came
> to this conclusion :-)
For FPRecipEstimate the change in the sign handling was fixing a genuine
erratum in the pseudocode. (QEMU's code for that is correct; I recall
checking at the time that we were following the amended pseudocode
rather than the old version.) For FPSqrtEstimate it's just a clarity
of phrasing issue.
Anyway, I agree we should make this change and have tested that
we still generate correct results. So:
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
-- PMM
     prev parent reply	other threads:[~2011-10-10 12:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03 14:28 [Qemu-devel] [PATCH] rsqrte_f32: No need to copy sign bit Christophe Lyon
2011-10-08 22:57 ` Peter Maydell
2011-10-10 11:26   ` Christophe Lyon
2011-10-10 12:26     ` Peter Maydell [this message]
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='CAFEAcA9fcqFcq6+cbM9i2PvapWkvn_KXST8GDaBJA=ATQPpt_g@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=christophe.lyon@st.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).