glibc/sysdeps/x86_64
Joseph Myers f280fa6d17 Use __builtin_fma more in dbl-64 code.
sysdeps/ieee754/dbl-64/dla.h can use a macro DLA_FMS for more
efficient double-width operations when fused multiply-subtract is
supported.  However, this macro is only defined for x86_64,
conditional on architecture-specific __FMA4__.  This patch makes the
code use __builtin_fma conditional on __FP_FAST_FMA, as used elsewhere
in glibc.

Tested for x86_64, x86 and powerpc.  On powerpc (where this is causing
fused operations to be used where they weren't previously) I see an
increase from 1ulp to 2ulp in the imaginary part of clog10:

testing double (without inline functions)
Failure: Test: Imaginary part of: clog10 (0x1.7a858p+0 - 0x6.d940dp-4 i)
Result:
 is:         -1.2237865208199886e-01  -0x1.f5435146bb61ap-4
 should be:  -1.2237865208199888e-01  -0x1.f5435146bb61cp-4
 difference:  2.7755575615628914e-17   0x1.0000000000000p-55
 ulp       :  2.0000
 max.ulp   :  1.0000
Maximal error of real part of: clog10
 is      : 3 ulp
 accepted: 3 ulp
Maximal error of imaginary part of: clog10
 is      : 2 ulp
 accepted: 1 ulp

This is actually resulting from atan2 becoming *more* accurate (atan2
(-0x6.d940dp-4, 0x1.7a858p+0) should ideally be -0x1.208cd6e841554p-2
but was -0x1.208cd6e841555p-2 from a powerpc libm built before this
change, and is -0x1.208cd6e841554p-2 from a powerpc libm built after
this change).  Since these functions are not expected to be correctly
rounding by glibc's accuracy goals, neither result is a problem, but
this does imply that some of this code, although designed to be
correctly rounding, is not in fact correctly rounding (possibly
because of GCC creating fused operations where the code does not
expect it, something we've only disabled for specific functions where
it was found to cause large errors).  (Of course as previously
discussed I think we should remove the slow cases where an error
analysis shows this wouldn't increase the errors much above 0.5ulp;
it's only functions such as cratan2 that are expected to be correctly
rounding, not atan2.)

	* sysdeps/ieee754/dbl-64/dla.h [__FP_FAST_FMA] (DLA_FMS): Define
	macro to use __builtin_fma.
	* sysdeps/x86_64/fpu/dla.h: Remove file.
2016-09-30 15:49:51 +00:00
..
64 Move architecture shlib-versions files to Linux-specific directories. 2014-07-17 14:31:12 +00:00
fpu Use __builtin_fma more in dbl-64 code. 2016-09-30 15:49:51 +00:00
multiarch Require binutils 2.24 to build x86-64 glibc [BZ #20139] 2016-07-01 06:03:05 -07:00
nptl elf: Consolidate machine-agnostic DTV definitions in <dl-dtv.h> 2016-06-20 14:31:40 +02:00
x32 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
____longjmp_chk.S ____longjmp_chk is now OS-specific. 2009-07-30 21:42:27 -07:00
__longjmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
_mcount.S 2016-03-03 Paul Pluzhnikov <ppluzhnikov@google.com> 2016-03-03 09:53:49 -08:00
abort-instr.h Update. 2001-09-19 10:37:31 +00:00
add_n.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
addmul_1.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
atomic-machine.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
backtrace.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
bzero.S Make an empty file. 2007-10-16 05:59:15 +00:00
configure Require binutils 2.24 to build x86-64 glibc [BZ #20139] 2016-07-01 06:03:05 -07:00
configure.ac Require binutils 2.24 to build x86-64 glibc [BZ #20139] 2016-07-01 06:03:05 -07:00
crti.S Replace PREINIT_FUNCTION@PLT with *%rax in call 2016-03-04 16:15:41 -08:00
crtn.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-irel.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-lookupcfg.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-machine.h X86-64: Add _dl_runtime_resolve_avx[512]_{opt|slow} [BZ #20508] 2016-09-06 08:51:07 -07:00
dl-procinfo.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-runtime.c * elf/dl-runtime.c (reloc_offset): Define. 2009-03-15 00:26:14 +00:00
dl-tls.h elf: Consolidate machine-agnostic DTV definitions in <dl-dtv.h> 2016-06-20 14:31:40 +02:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-tlsdesc.S x86-64: Properly align stack in _dl_tlsdesc_dynamic [BZ #20309] 2016-07-12 06:30:08 -07:00
dl-trampoline.h X86-64: Add _dl_runtime_resolve_avx[512]_{opt|slow} [BZ #20508] 2016-09-06 08:51:07 -07:00
dl-trampoline.S X86-64: Add _dl_runtime_resolve_avx[512]_{opt|slow} [BZ #20508] 2016-09-06 08:51:07 -07:00
ffs.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ffsll.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
hp-timing.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
htonl.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ifuncmain8.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ifuncmod8.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Implies Use x86-64 bits/byteswap.h for both i386 and x86_64 2012-05-30 14:13:18 -07:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
l10nflist.c Minor optimization of popcount in l10nflist 2011-08-11 14:07:04 -04:00
ldbl2mpn.c [BZ #4586] 2007-06-08 02:50:59 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
link-defines.sym Replace __int128 with __int128_t 2014-05-30 10:50:21 -07:00
locale-defines.sym Implement optimized strcaecmp for x86-64. 2010-07-30 00:14:04 -07:00
localplt.data Support PLT and GOT references in local PIC check 2015-10-14 06:00:02 -07:00
lshift.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Makefile Register extra test objects 2016-04-13 17:07:13 +02:00
memchr.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memcmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memcopy.h X86-64: Add dummy memcopy.h and wordcopy.c 2016-06-09 04:38:34 -07:00
memcpy_chk.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memcpy.S X86-64: Remove previous default/SSE2/AVX2 memcpy/memmove 2016-06-08 13:58:08 -07:00
memmove_chk.S X86-64: Remove previous default/SSE2/AVX2 memcpy/memmove 2016-06-08 13:58:08 -07:00
memmove.S X86-64: Remove previous default/SSE2/AVX2 memcpy/memmove 2016-06-08 13:58:08 -07:00
mempcpy_chk.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
mempcpy.S X86-64: Remove previous default/SSE2/AVX2 memcpy/memmove 2016-06-08 13:58:08 -07:00
memrchr.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memset_chk.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memset.S X86-64: Remove the previous SSE2/AVX2 memsets 2016-06-08 13:56:14 -07:00
memusage.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
mp_clz_tab.c * sysdeps/x86_64/mp_clz_tab.c: New file. 2009-04-15 04:30:41 +00:00
mul_1.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
preconfigure rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
preconfigure.ac rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
rawmemchr.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
rshift.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sched_cpucount.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setjmp.S Call x86-64 __mcount_internal/__sigjmp_save directly 2016-03-01 16:58:07 -08:00
stack-aliasing.h Clean up stack-coloring macros. 2014-06-20 19:50:16 -07:00
stackguard-macros.h BZ #15754: CVE-2013-4788 2013-09-23 00:52:09 -04:00
stackinfo.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
start.S Always indirect branch to __libc_start_main via GOT 2016-06-09 04:43:31 -07:00
stpcpy.S Update. 2004-05-28 06:56:51 +00:00
strcasecmp_l-nonascii.c Remove pre-ISO C support 2012-01-07 23:57:22 -05:00
strcasecmp_l.S Implement optimized strcaecmp for x86-64. 2010-07-30 00:14:04 -07:00
strcasecmp.S Implement optimized strcaecmp for x86-64. 2010-07-30 00:14:04 -07:00
strcat.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strchr.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strchrnul.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strcmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strcpy.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strcspn.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strlen.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strncase_l-nonascii.c Remove pre-ISO C support 2012-01-07 23:57:22 -05:00
strncase_l.S Add optimized strncasecmp versions for x86-64. 2010-08-14 22:04:01 -07:00
strncase.S Add optimized strncasecmp versions for x86-64. 2010-08-14 22:04:01 -07:00
strncmp.S Add SSE2 support to str{,n}cmp for x86-64. 2009-07-26 13:32:28 -07:00
strnlen.S Faster strlen on x64. 2013-03-18 07:39:12 +01:00
strpbrk.S Update. 2002-08-31 17:45:33 +00:00
strrchr.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strspn.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strtok_r.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
strtok.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sub_n.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
submul_1.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sysdep.h Avoid an extra branch to PLT for -z now 2016-05-24 08:44:23 -07:00
tls-macros.h Split tls-macros.h into sysdeps directories. 2012-07-17 11:30:58 +00:00
tlsdesc.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tlsdesc.sym Introduce TLS descriptors for i386 and x86_64. 2008-05-13 05:41:30 +00:00
tst-audit3.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-audit4-aux.c tst-audit4, tst-audit10: Compile AVX/AVX-512 code separately [BZ #19269] 2016-03-07 16:00:25 +01:00
tst-audit4.c tst-audit4, tst-audit10: Compile AVX/AVX-512 code separately [BZ #19269] 2016-03-07 16:00:25 +01:00
tst-audit5.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-audit6.c Modify several tests to use test-skeleton.c 2015-07-15 15:10:23 +05:30
tst-audit7.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-audit10-aux.c Fix tst-audit10 build when -mavx512f is not supported. 2016-03-08 12:32:59 -08:00
tst-audit10.c tst-audit10: Fix compilation on compilers without bit_AVX512F [BZ #19860] 2016-03-25 11:11:42 +01:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tst-auditmod3a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod3b.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod4a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod4b.c Add la_symbind32 to x86-64 audit tests 2015-07-07 06:09:29 -07:00
tst-auditmod5a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod5b.c Add la_symbind32 to x86-64 audit tests 2015-07-07 06:09:29 -07:00
tst-auditmod6a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod6b.c Add la_symbind32 to x86-64 audit tests 2015-07-07 06:09:29 -07:00
tst-auditmod6c.c Add la_symbind32 to x86-64 audit tests 2015-07-07 06:09:29 -07:00
tst-auditmod7a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod7b.c Add la_symbind32 to x86-64 audit tests 2015-07-07 06:09:29 -07:00
tst-auditmod10a.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tst-auditmod10b.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tst-mallocalign1.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tst-quad1.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tst-quad1pie.c Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-quad2.c Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-quad2pie.c Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-quadmod1.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tst-quadmod1pie.S Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-quadmod2.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tst-quadmod2pie.S Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-split-dynreloc.c Fix dynamic linker issue with bind-now 2015-08-19 05:37:01 -07:00
tst-split-dynreloc.lds Fix dynamic linker issue with bind-now 2015-08-19 05:37:01 -07:00
tst-stack-align.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Versions Work around old buggy program which cannot cope with memcpy semantics. 2011-04-01 19:38:21 -04:00
wcschr.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
wcscmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
wcslen.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
wcsrchr.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
wordcopy.c X86-64: Add dummy memcopy.h and wordcopy.c 2016-06-09 04:38:34 -07:00