On 10 October 2011 12:26, Christophe Lyon <christophe.l...@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.mayd...@linaro.org>

-- PMM

Reply via email to