[12/28] math: Use wordsize-64 version for isnan
Commit Message
On Fri, Mar 29 2019, Adhemerval Zanella wrote:
>
> - The resulting binary difference on 32 bits architecture is minimum
> for the non hotspot symbol.
I don't actually understand what the impact on 32-bits platforms would
be, so I can't comment on that, but, if this patch turns out to be
problematic for 32-bits, we could patch sysdeps/ieee754/ldbl-opt files
to be mindful of __WORDSIZE and selectively include files from
sysdeps/ieee754/dbl-64 or sysdeps/ieee754/dbl-64/wordsize-64 (see
attached patch for an explanation of what I mean).
My point in raising this is that the subsequent patch [1] benefits from
this current patch (or, alternatively, from the attached patch, since
they have the same outcame, as expected). So, if this patch gets
objections we could go with the alternative.
[1] https://sourceware.org/ml/libc-alpha/2019-03/msg00674.html
@@ -1,5 +1,10 @@
+#include <limits.h>
#include <math_ldbl_opt.h>
+#if __WORDSIZE == 64
+#include <sysdeps/ieee754/dbl-64/wordsize-64/s_finite.c>
+#else
#include <sysdeps/ieee754/dbl-64/s_finite.c>
+#endif
weak_alias (__finite, ___finite)
#if IS_IN (libm)
# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
@@ -1,5 +1,10 @@
+#include <limits.h>
#include <math_ldbl_opt.h>
+#if __WORDSIZE == 64
+#include <sysdeps/ieee754/dbl-64/wordsize-64/s_isinf.c>
+#else
#include <sysdeps/ieee754/dbl-64/s_isinf.c>
+#endif
#if !IS_IN (libm)
# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0);
@@ -1,5 +1,10 @@
+#include <limits.h>
#include <math_ldbl_opt.h>
+#if __WORDSIZE == 64
+#include <sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c>
+#else
#include <sysdeps/ieee754/dbl-64/s_isnan.c>
+#endif
#if !IS_IN (libm)
# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);