glibc/sysdeps
Joseph Myers e8bd5286c6 Fix powerpc software sqrt (bug 17964).
As Adhemerval noted in
<https://sourceware.org/ml/libc-alpha/2015-01/msg00451.html>, the
powerpc sqrt implementation for when _ARCH_PPCSQ is not defined is
inaccurate in some cases.

The problem is that this code relies on fused multiply-add, and relies
on the compiler contracting a * b + c to get a fused operation.  But
sysdeps/ieee754/dbl-64/Makefile disables contraction for e_sqrt.c,
because the implementation in that directory relies on *not* having
contracted operations.

While it would be possible to arrange makefiles so that an earlier
sysdeps directory can disable the setting in
sysdeps/ieee754/dbl-64/Makefile, it seems a lot cleaner to make the
dependence on fused operations explicit in the .c file.  GCC 4.6
introduced support for __builtin_fma on powerpc and other
architectures with such instructions, so we can rely on that; this
patch duly makes the code use __builtin_fma for all such fused
operations.

Tested for powerpc32 (hard float).

2015-02-12  Joseph Myers  <joseph@codesourcery.com>

	[BZ #17964]
	* sysdeps/powerpc/fpu/e_sqrt.c (__slow_ieee754_sqrt): Use
	__builtin_fma instead of relying on contraction of a * b + c.
2015-02-12 23:05:37 +00:00
..
aarch64 Clean up sysdep-dl-routines variable. 2015-02-06 10:42:08 -08:00
alpha Fix libm feupdateenv namespace (bug 17748). 2015-01-07 19:01:20 +00:00
arm Use -Werror=undef for assembly code. 2015-02-12 13:57:32 -08:00
generic Fix recursive dlopen. 2015-01-21 01:51:10 -05:00
gnu hurd: fix unwind-resume.c build 2015-02-08 18:46:00 +01:00
hppa Clean up sysdep-dl-routines variable. 2015-02-06 10:42:08 -08:00
i386 Fix exp2 spurious underflows (bug 16560). 2015-02-12 19:02:45 +00:00
ia64 Clean up sysdep-dl-routines variable. 2015-02-06 10:42:08 -08:00
ieee754 Fix exp2 spurious underflows (bug 16560). 2015-02-12 19:02:45 +00:00
init_array Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
m68k m68k: fix missing definition of __feraiseexcept 2015-01-25 23:36:02 +01:00
mach hurd: fix tls.h build 2015-02-08 05:06:17 +01:00
microblaze MicroBlaze: Avoid pointer to integer conversion warning 2015-01-09 14:49:27 +10:00
mips Remove sysdeps/mips soft-fp subdirectories. 2015-02-10 22:01:39 +00:00
nios2 glibc 2.21 pre-release update. 2015-02-05 23:14:38 -05:00
nptl Include <signal.h> in sysdeps/nptl/allocrtsig.c 2015-01-29 10:00:25 +01:00
posix Fix shm-directory.h #include. 2015-01-09 16:08:14 -08:00
powerpc Fix powerpc software sqrt (bug 17964). 2015-02-12 23:05:37 +00:00
pthread hurd: fix build with pthread aio 2015-02-07 21:48:32 +01:00
s390 S390: Get rid of linknamespace failures for string functions. 2015-01-16 09:17:32 +01:00
sh Fix libm feupdateenv namespace (bug 17748). 2015-01-07 19:01:20 +00:00
sparc Fix two bugs in sparc atomics. 2015-01-31 23:39:50 -08:00
tile tilegx32: set __HAVE_64B_ATOMICS to 0 2015-01-28 14:51:21 -05:00
unix Use -Werror=undef for assembly code. 2015-02-12 13:57:32 -08:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
x86 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
x86_64 Fix exp2 spurious underflows (bug 16560). 2015-02-12 19:02:45 +00:00