On 09.10.2011 00:57, Peter Maydell wrote:
On 3 October 2011 15:28, Christophe Lyon<christophe.l...@st.com> wrote:
Indeed, the result is known to be always positive.
- val = ((val64>> 63)& 0x80000000)
- | ((result_exp& 0xff)<< 23)
+ val = ((result_exp& 0xff)<< 23)
| ((val64>> 29)& 0x7fffff);
return make_float32(val);
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 :-(
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 :-)
I have contacted ARM support and suggested them to fix both function
accordingly :-)
Christophe.