qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] rsqrte_f32: No need to copy sign bit.


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] rsqrte_f32: No need to copy sign bit.
Date: Mon, 10 Oct 2011 13:26:40 +0100

On 10 October 2011 12:26, Christophe Lyon <address@hidden> 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 <address@hidden>

-- PMM



reply via email to

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