This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] ppc: Fix modf (sNaN) for pre-POWER5+ CPU (bug 20240).
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Wed, 6 Jul 2016 16:54:29 -0300
- Subject: Re: [PATCH] ppc: Fix modf (sNaN) for pre-POWER5+ CPU (bug 20240).
- Authentication-results: sourceware.org; auth=none
- References: <1467811476-5893-1-git-send-email-aurelien@aurel32.net>
LGTM.
On 06/07/2016 10:24, Aurelien Jarno wrote:
> Commit a6a4395d fixed modf implementation by compiling s_modf.c and
> s_modff.c with -fsignaling-nans. However these files are also included
> from the pre-POWER5+ implementation, and thus these files should also
> be compiled with -fsignaling-nans.
>
> Changelog:
> [BZ #20240]
> * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
> (CFLAGS-s_modf-ppc32.c): New variable.
> (CFLAGS-s_modff-ppc32.c): Likewise.
> * sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
> (CFLAGS-s_modf-ppc64.c): Likewise.
> (CFLAGS-s_modff-ppc64.c): Likewise.
> ---
> ChangeLog | 10 ++++++++++
> sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile | 5 +++++
> sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile | 5 +++++
> 3 files changed, 20 insertions(+)
>
> diff --git a/ChangeLog b/ChangeLog
> index 72c5549..28aa60a 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,13 @@
> +2016-07-06 Aurelien Jarno <aurelien@aurel32.net>
> +
> + [BZ #20240]
> + * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
> + (CFLAGS-s_modf-ppc32.c): New variable.
> + (CFLAGS-s_modff-ppc32.c): Likewise.
> + * sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
> + (CFLAGS-s_modf-ppc64.c): Likewise.
> + (CFLAGS-s_modff-ppc64.c): Likewise.
> +
> 2016-07-06 John David Anglin <danglin@gcc.gnu.org>
>
> * sysdeps/hppa/fpu/libm-test-ulps: Regenerate.
> diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
> index 590a8eb..804e7dc 100644
> --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
> +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
> @@ -34,4 +34,9 @@ CFLAGS-s_logb-power7.c = -mcpu=power7
> CFLAGS-s_logbf-power7.c = -mcpu=power7
> CFLAGS-e_hypot-power7.c = -mcpu=power7
> CFLAGS-e_hypotf-power7.c = -mcpu=power7
> +
> +# These files quiet sNaNs in a way that is optimized away without
> +# -fsignaling-nans.
> +CFLAGS-s_modf-ppc32.c += -fsignaling-nans
> +CFLAGS-s_modff-ppc32.c += -fsignaling-nans
> endif
> diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
> index add1fb8..ff42288 100644
> --- a/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
> +++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
> @@ -35,4 +35,9 @@ CFLAGS-s_modf-power5+.c = -mcpu=power5+
> CFLAGS-s_modff-power5+.c = -mcpu=power5+
> CFLAGS-e_hypot-power7.c = -mcpu=power7
> CFLAGS-e_hypotf-power7.c = -mcpu=power7
> +
> +# These files quiet sNaNs in a way that is optimized away without
> +# -fsignaling-nans.
> +CFLAGS-s_modf-ppc64.c += -fsignaling-nans
> +CFLAGS-s_modff-ppc64.c += -fsignaling-nans
> endif
>