diff mbox

target-arm: fix for exponent comparison in recpe_f64

Message ID 1423135673-9025-1-git-send-email-ild@inbox.ru
State New
Headers show

Commit Message

ild@inbox.ru Feb. 5, 2015, 11:27 a.m. UTC
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 mbox

Patch

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));
     }