qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-arm: fix for exponent comparison in recpe_f64
@ 2015-02-05 11:27 ild
  2015-02-05 13:30 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: ild @ 2015-02-05 11:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Ildar Isaev

From: Ildar Isaev <ild@inbox.ru>

f64 exponent in HELPER(recpe_f64) should be compared to 2045 rather than 1023
(FPRecipEstimate in ARMV8 spec)

Signed-off-by: Ildar Isaev <ild@inbox.ru>
---
 target-arm/helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target-arm/helper.c b/target-arm/helper.c
index 1a5e067..f2feec4 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -6242,7 +6242,7 @@ float64 HELPER(recpe_f64)(float64 input, void *fpstp)
         } else {
             return float64_set_sign(float64_maxnorm, float64_is_neg(f64));
         }
-    } else if (f64_exp >= 1023 && fpst->flush_to_zero) {
+    } else if (f64_exp >= 2045 && fpst->flush_to_zero) {
         float_raise(float_flag_underflow, fpst);
         return float64_set_sign(float64_zero, float64_is_neg(f64));
     }
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] target-arm: fix for exponent comparison in recpe_f64
  2015-02-05 11:27 [Qemu-devel] [PATCH] target-arm: fix for exponent comparison in recpe_f64 ild
@ 2015-02-05 13:30 ` Peter Maydell
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2015-02-05 13:30 UTC (permalink / raw)
  To: ild; +Cc: QEMU Developers

On 5 February 2015 at 11:27,  <ild@inbox.ru> wrote:
> From: Ildar Isaev <ild@inbox.ru>
>
> f64 exponent in HELPER(recpe_f64) should be compared to 2045 rather than 1023
> (FPRecipEstimate in ARMV8 spec)
>
> Signed-off-by: Ildar Isaev <ild@inbox.ru>
> ---
>  target-arm/helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to target-arm.next. I tweaked the commit message
a little to add

"This fixes incorrect underflow handling when flushing denormals
to zero in the FRECPE instructions operating on 64-bit values."

just to clarify the scope of the bug a little.

-- PMM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-05 13:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-05 11:27 [Qemu-devel] [PATCH] target-arm: fix for exponent comparison in recpe_f64 ild
2015-02-05 13:30 ` Peter Maydell

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).