about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2021-01-07 15:02:51 +0000
committerWilco Dijkstra <wdijkstr@arm.com>2021-01-07 15:02:51 +0000
commitcaa884dda78ff226243f8cb344915152052a5118 (patch)
treea5fcfa074740663eba0f4491aafa43d1c10d8767 /sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c
parent3016596a819aeedfdc7d658435016be413a1fca7 (diff)
downloadglibc-caa884dda78ff226243f8cb344915152052a5118.tar.gz
glibc-caa884dda78ff226243f8cb344915152052a5118.tar.xz
glibc-caa884dda78ff226243f8cb344915152052a5118.zip
Remove dbl-64/wordsize-64
Remove the wordsize-64 implementations by merging them into the main dbl-64
directory.  The first patch adds special cases needed for 32-bit targets
(FIX_INT_FP_CONVERT_ZERO and FIX_DBL_LONG_CONVERT_OVERFLOW) to the
wordsize-64 versions.  This has no effect on 64-bit targets since they don't
define these macros.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c')
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c
index c8415daf25..5e4ccd9ad1 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c
@@ -20,6 +20,7 @@
 #include <math_private.h>
 #include <libm-alias-double.h>
 #include <stdint.h>
+#include <fix-int-fp-convert-zero.h>
 
 double
 __getpayload (const double *x)
@@ -30,6 +31,8 @@ __getpayload (const double *x)
       || (ix & 0xfffffffffffffULL) == 0)
     return -1;
   ix &= 0x7ffffffffffffULL;
+  if (FIX_INT_FP_CONVERT_ZERO && ix == 0)
+    return 0.0f;
   return (double) ix;
 }
 libm_alias_double (__getpayload, getpayload)