Message ID | fa6c5987-a9c9-a7ef-6006-29058b95f8f4@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
On Mon, 8 Aug 2016, Paul E. Murphy wrote: > This causes a test failure on float128/ppc64le > as the multiplication is optimized away. This > updates it to use conversions similar to other > files. This patch is not relative to current glibc. You'll also need to explain why the # These files quiet sNaNs in a way that is optimized away without # -fsignaling-nans. CFLAGS-s_modf.c += -fsignaling-nans CFLAGS-s_modff.c += -fsignaling-nans CFLAGS-s_modfl.c += -fsignaling-nans in math/Makefile isn't working, as it is for all the similar implementations and other architectures.
On 08/08/2016 10:20 AM, Joseph Myers wrote: > On Mon, 8 Aug 2016, Paul E. Murphy wrote: > >> This causes a test failure on float128/ppc64le >> as the multiplication is optimized away. This >> updates it to use conversions similar to other >> files. > > This patch is not relative to current glibc. You'll also need to explain > why the > > # These files quiet sNaNs in a way that is optimized away without > # -fsignaling-nans. > CFLAGS-s_modf.c += -fsignaling-nans > CFLAGS-s_modff.c += -fsignaling-nans > CFLAGS-s_modfl.c += -fsignaling-nans > > in math/Makefile isn't working, as it is for all the similar > implementations and other architectures. > And, I missed that little bit of makefile. Thank you for pointing it out. I'll drop the patch for now. Is there a practical, reusable mechanism to apply a set of CFLAGS to a list of objects derived from a make variable without using eval? Florian raised this issue earlier and received no feedback. Likewise, the same question applies to my proposed patches to refactor the _Complex wrappers.
On Mon, 8 Aug 2016, Paul E. Murphy wrote: > Is there a practical, reusable mechanism to apply a > set of CFLAGS to a list of objects derived from a make > variable without using eval? Florian raised this issue > earlier and received no feedback. I have no advice on that question.
diff --git a/sysdeps/ieee754/ldbl-128/s_modfl.c b/sysdeps/ieee754/ldbl-128/s_modfl.c index adb1ca6..05bcc81 100644 --- a/sysdeps/ieee754/ldbl-128/s_modfl.c +++ b/sysdeps/ieee754/ldbl-128/s_modfl.c @@ -30,8 +30,6 @@ static char rcsid[] = "$NetBSD: $"; #include <math.h> #include <math_private.h> -static const ldouble_t one = 1.0; - ldouble_t __modfl(ldouble_t x, ldouble_t *iptr) { int64_t i0,i1,j0; @@ -56,14 +54,15 @@ ldouble_t __modfl(ldouble_t x, ldouble_t *iptr) } } } else if (j0>111) { /* no fraction part */ - *iptr = x*one; /* We must handle NaNs separately. */ if (j0 == 0x4000 && ((i0 & 0x0000ffffffffffffLL) | i1)) { - *iptr = x+x; - return x+x; + /* Coerce x and iptr into qnans. */ + *iptr = x + x; + return *iptr; } /* return +-0 */ + *iptr = x; SET_LDOUBLE_WORDS64(x,i0&0x8000000000000000ULL,0); return x; } else { /* fraction part in low x */