glibc/sysdeps/i386
Joseph Myers e2bcf6a855 Fix i386 fenv_private.h float128 for 32-bit --with-fpmath=sse (bug 22902).
As discussed in bug 22902, the i386 fenv_private.h implementation has
problems for float128 for the case of 32-bit glibc built with libgcc
from GCC configured using --with-fpmath=sse.

The optimized floating-point state handling in fenv_private.h needs to
know which floating-point state - x87 or SSE - is used for each
floating-point type, so that only one state needs updating / testing
for libm code using that state internally.  On 32-bit x86, the x87
rounding mode is always used for float128, but the x87 exception flags
are only used when libgcc is built using x87 floating-point
arithmetic; if libgcc is built for SSE arithmetic, the SSE exception
flags are used.

The choice of arithmetic with which libgcc is built is independent of
that with which glibc is built.  Thus, since glibc cannot tell the
choice used in libgcc, the default implementations of
libc_feholdexcept_setroundf128 and libc_feupdateenv_testf128 (which
use the <fenv.h> functions, thus using both x87 and SSE state on
processors that have both) need to be used; this patch updates the
code accordingly.

Tested for 32-bit x86; HJ reports testing in the --with-fpmath=sse
case.

	[BZ #22902]
	* sysdeps/i386/fpu/fenv_private.h [!__x86_64__]
	(libc_feholdexcept_setroundf128): New macro.
	[!__x86_64__] (libc_feupdateenv_testf128): Likewise.
2018-02-28 21:55:51 +00:00
..
fpu Fix i386 fenv_private.h float128 for 32-bit --with-fpmath=sse (bug 22902). 2018-02-28 21:55:51 +00:00
i586 Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
i686 Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
i786
nptl Revert Intel CET changes to __jmp_buf_tag (Bug 22743) 2018-01-25 23:43:46 -08:00
sys Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
____longjmp_chk.S
__longjmp.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
abort-instr.h
add_n.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
addmul_1.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
asm-syntax.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
atomic-machine.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
backtrace.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
bcopy.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
bzero.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
cacheinfo.c Move sysdeps/x86_64/cacheinfo.c to sysdeps/x86 2016-05-08 08:49:18 -07:00
configure Add --enable-static-pie configure option to build static PIE [BZ #19574] 2017-12-15 17:12:14 -08:00
configure.ac Add --enable-static-pie configure option to build static PIE [BZ #19574] 2017-12-15 17:12:14 -08:00
crti.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
crtn.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-irel.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-lookupcfg.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-machine.h i386: Use __glibc_likely/__glibc_likely in dl-machine.h 2018-02-05 06:22:40 -08:00
dl-procinfo.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-tls.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-tlsdesc.S hurd: Fix build without NO_HIDDEN 2018-01-06 18:20:18 +01:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ffs.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gccframe.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gmp-mparam.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
htonl.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
htons.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
i386-mcount.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Implies Add float128 support for x86_64, x86. 2017-06-26 22:02:24 +00:00
init-arch.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ldbl2mpn.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
link-defines.sym Preserve bound registers for pointer pass/return 2015-07-09 06:50:12 -07:00
lshift.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Makefile Enable unwind info in libc-start.c and backtrace.c 2017-09-19 15:07:58 +01:00
malloc-alignment.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memchr.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memcmp.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memcopy.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memcpy_chk.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memcpy.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memmove_chk.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memmove.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
mempcpy_chk.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mempcpy.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
memset_chk.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memset.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memusage.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mp_clz_tab.c
mul_1.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
preconfigure Move base_machine and machine settings from configure.ac to sysdeps preconfigure fragments. 2014-06-25 17:52:56 +00:00
pthread_spin_trylock.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
rawmemchr.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
rshift.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
setfpucw.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
setjmp.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00: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. 2018-01-01 00:32:25 +00:00
start.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stpcpy.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stpncpy.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcat.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strchr.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strchrnul.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcspn.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
string-inlines.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strlen.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strlen.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strpbrk.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strrchr.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strspn.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sub_n.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
submul_1.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
symbol-hacks.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sysdep.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tls-macros.h i386: Fix build by GCC 5.0 2014-12-30 11:37:41 -08:00
tlsdesc.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tlsdesc.sym
tst-audit3.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-audit3.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-auditmod3a.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-auditmod3b.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-ld-sse-use.sh Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-stack-align.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Versions Merge sysdeps/i386/elf/Versions into sysdeps/i386/Versions. 2012-03-19 21:02:40 +01:00