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: Christophe Lyon
Subject: Re: [Qemu-devel] [PATCH] rsqrte_f32: No need to copy sign bit.
Date: Mon, 10 Oct 2011 13:26:36 +0200
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2

On 09.10.2011 00:57, Peter Maydell wrote:
On 3 October 2011 15:28, Christophe Lyon<address@hidden>  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.




reply via email to

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