This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Extend powerpc-nofpu -fno-builtin-fabsl workaround to more files


On 10-10-2013 14:25, Joseph S. Myers wrote:
> For powerpc-nofpu, several libm files are built with
> -fno-builtin-fabsl because of a GCC bug where a generic inline
> expansion of fabsl, involving comparison with 0, is incorrect for -0.
>
> The same GCC bug also affects quiet NaN arguments: by doing an ordered
> comparison with 0, exceptions are raised (whereas fabsl maps to IEEE
> 754 abs, which should never raise exceptions even for signaling NaNs).
> This is covered up by bug 14910, but becomes visible with my patch
> <https://sourceware.org/ml/libc-alpha/2013-10/msg00365.html> to fix
> that bug.  This patch extends the workaround to the extra files
> needing it once that bug is fixed.
>
> Tested for powerpc-nofpu.
>
> 2013-10-10  Joseph Myers  <joseph@codsourcery.com>
>
> 	* sysdeps/powerpc/nofpu/Makefile [$(subdir) = math]
> 	(CFLAGS-e_hypotl.c): Add -fno-builtin-fabsl.
> 	[$(subdir) = math] (CFLAGS-w_acosl.c): Likewise.
> 	[$(subdir) = math] (CFLAGS-w_asinl.c): Likewise.
> 	[$(subdir) = math] (CFLAGS-w_atanhl.c): Likewise.
> 	[$(subdir) = math] (CFLAGS-w_j0l.c): Likewise.
> 	[$(subdir) = math] (CFLAGS-w_j1l.c): Likewise.
>
> diff --git a/sysdeps/powerpc/nofpu/Makefile b/sysdeps/powerpc/nofpu/Makefile
> index 6bdff45..b9cbf80 100644
> --- a/sysdeps/powerpc/nofpu/Makefile
> +++ b/sysdeps/powerpc/nofpu/Makefile
> @@ -14,6 +14,7 @@ CPPFLAGS += -I../soft-fp/
>  # gcc-4.1.1 and may be too late for gcc-4.2.  So we need these flags
>  # until the fix in a gcc release and glibc drops support for earlier
>  # versions of gcc.
> +CFLAGS-e_hypotl.c += -fno-builtin-fabsl
>  CFLAGS-e_powl.c += -fno-builtin-fabsl
>  CFLAGS-s_ccoshl.c += -fno-builtin-fabsl
>  CFLAGS-s_csinhl.c += -fno-builtin-fabsl
> @@ -21,4 +22,9 @@ CFLAGS-s_clogl.c += -fno-builtin-fabsl
>  CFLAGS-s_clog10l.c += -fno-builtin-fabsl
>  CFLAGS-s_csinl.c += -fno-builtin-fabsl
>  CFLAGS-s_csqrtl.c += -fno-builtin-fabsl
> +CFLAGS-w_acosl.c += -fno-builtin-fabsl
> +CFLAGS-w_asinl.c += -fno-builtin-fabsl
> +CFLAGS-w_atanhl.c += -fno-builtin-fabsl
> +CFLAGS-w_j0l.c += -fno-builtin-fabsl
> +CFLAGS-w_j1l.c += -fno-builtin-fabsl
>  endif
>
I'm ok with this patch. Does this GCC bug still occur with GLIBC's minimum supported version?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]