glibc/sysdeps/x86_64
Joseph Myers 5146356f5a Add fesetexcept.
TS 18661-1 defines an fesetexcept function for setting floating-point
exception flags without the side-effect of causing enabled traps to be
taken.

This patch series implements this function for glibc.  The present
patch adds the fallback stub implementation, x86 and x86_64
implementations, documentation, tests and ABI baseline updates.  The
remaining patches, some of them untested, add implementations for
other architectures.  The implementations generally follow those of
the fesetexceptflag function.

As for fesetexceptflag, the approach taken for architectures where
setting flags causes enabled traps to be taken is to set the flags
(and potentially cause traps) rather than refusing to set the flags
and returning an error.  Since ISO C and TS 18661 provide no way to
enable traps, this is formally in accordance with the standards.

The NEWS entry should be considered a placeholder, since this patch
series is intended to be followed by further such series adding other
TS 18661-1 features, so that the NEWS entry would end up looking more
like

* New <fenv.h> features from TS 18661-1:2014 are added to libm: the
  fesetexcept, fetestexceptflag, fegetmode and fesetmode functions,
  the femode_t type and the FE_DFL_MODE macro.

with hopefully more such entries for other features, rather than
having an entry for a single function in the end.

I believe we have consensus for adding TS 18661-1 interfaces as per
<https://sourceware.org/ml/libc-alpha/2016-06/msg00421.html>.

Tested for x86_64, x86, mips64 (hard float, and soft float to test the
fallback version), arm (hard float) and powerpc (hard float, soft
float and e500).

	* math/fesetexcept.c: New file.
	* sysdeps/i386/fpu/fesetexcept.c: Likewise.
	* sysdeps/x86_64/fpu/fesetexcept.c: Likewise.
	* math/fenv.h: Define
	__GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION and include
	<bits/libc-header-start.h> instead of including <features.h>.
	[__GLIBC_USE (IEC_60559_BFP_EXT)] (fesetexcept): New function
	declaration.
	* manual/arith.texi (fesetexcept): Document function.
	* math/Versions (fesetexcept): New libm symbol at version
	GLIBC_2.25.
	* math/Makefile (libm-support): Add fesetexcept.
	(tests): Add test-fesetexcept and test-fesetexcept-traps.
	* math/test-fesetexcept.c: New file.
	* math/test-fesetexcept-traps.c: Likewise.
	* sysdeps/nacl/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
2016-08-16 16:16:10 +00:00
..
64 Move architecture shlib-versions files to Linux-specific directories. 2014-07-17 14:31:12 +00:00
fpu Add fesetexcept. 2016-08-16 16:16:10 +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 Call init_cpu_features only if SHARED is defined 2016-05-13 08:29:33 -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] Set DL_RUNTIME_UNALIGNED_VEC_SIZE to 8 2016-02-19 15:45:09 -08:00
dl-trampoline.S Require binutils 2.24 to build x86-64 glibc [BZ #20139] 2016-07-01 06:03:05 -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