]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
target-arm: fix for exponent comparison in recpe_f64
authorIldar Isaev <ild@inbox.ru>
Thu, 5 Feb 2015 13:37:25 +0000 (13:37 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 5 Feb 2015 13:37:25 +0000 (13:37 +0000)
f64 exponent in HELPER(recpe_f64) should be compared to 2045 rather than 1023
(FPRecipEstimate in ARMV8 spec). This fixes incorrect underflow handling when
flushing denormals to zero in the FRECPE instructions operating on 64-bit
values.

Signed-off-by: Ildar Isaev <ild@inbox.ru>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm/helper.c

index d930021c13e9d224b0ce9b3450a4e442650a95d7..1a1a00577e7804da03ba22e24b82b3d912141e78 100644 (file)
@@ -6526,7 +6526,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));
     }