glibc/sysdeps/x86_64
Joseph Myers 903af5af9a Fix exp2 missing underflows (bug 16521).
Various exp2 implementations in glibc can miss underflow exceptions
when the scaling down part of the calculation is exact (or, in the x86
case, when the conversion from extended precision to the target
precision is exact).  This patch forces the exception in a similar way
to previous fixes.

The x86 exp2f changes may in fact not be needed for this purpose -
it's likely to be the case that no argument of type float has an exp2
result so close to an exact subnormal float value that it equals that
value when rounded to 64 bits (even taking account of variation
between different x86 implementations).  However, they are included
for consistency with the changes to exp2 and so as to fix the exp2f
part of bug 18875 by ensuring that excess range and precision is
removed from underflowing return values.

Tested for x86_64, x86 and mips64.

	[BZ #16521]
	[BZ #18875]
	* math/e_exp2l.c (__ieee754_exp2l): Force underflow exception for
	small results.
	* sysdeps/i386/fpu/e_exp2.S (dbl_min): New object.
	(MO): New macro.
	(__ieee754_exp2): For small results, force underflow exception and
	remove excess range and precision from return value.
	* sysdeps/i386/fpu/e_exp2f.S (flt_min): New object.
	(MO): New macro.
	(__ieee754_exp2f): For small results, force underflow exception
	and remove excess range and precision from return value.
	* sysdeps/i386/fpu/e_exp2l.S (ldbl_min): New object.
	(MO): New macro.
	(__ieee754_exp2l): Force underflow exception for small results.
	* sysdeps/ieee754/dbl-64/e_exp2.c (__ieee754_exp2): Likewise.
	* sysdeps/ieee754/flt-32/e_exp2f.c (__ieee754_exp2f): Likewise.
	* sysdeps/x86_64/fpu/e_exp2l.S (ldbl_min): New object.
	(MO): New macro.
	(__ieee754_exp2l): Force underflow exception for small results.
	* math/auto-libm-test-in: Add more tests or exp2.
	* math/auto-libm-test-out: Regenerated.
2015-09-14 22:00:12 +00:00
..
64 Move architecture shlib-versions files to Linux-specific directories. 2014-07-17 14:31:12 +00:00
fpu Fix exp2 missing underflows (bug 16521). 2015-09-14 22:00:12 +00:00
multiarch Remove x86-64 rtld-xxx.c and rtld-xxx.S 2015-08-25 08:50:06 -07:00
nptl Save and restore vector registers in x86-64 ld.so 2015-08-25 04:34:13 -07:00
x32 lround: provide cast for wordsize-64 version if needed 2015-01-05 11:59:32 -05:00
____longjmp_chk.S
__longjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
_mcount.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
abort-instr.h
add_n.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
addmul_1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
atomic-machine.h Move bits/atomic.h to atomic-machine.h (bug 14912). 2015-09-11 20:00:19 +00:00
backtrace.c Move bits/libc-lock.h and bits/libc-lockP.h out of bits/ (bug 14912). 2015-09-08 21:11:03 +00:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
bzero.S
cacheinfo.c Move x86_64 init-arch.h to sysdeps/x86/init-arch.h 2015-08-20 04:29:23 -07:00
configure More strict check of AVX512 support in assembler. 2015-06-11 13:50:07 +03:00
configure.ac More strict check of AVX512 support in assembler. 2015-06-11 13:50:07 +03:00
crti.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
crtn.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-irel.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-lookupcfg.h Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 2015-03-31 05:16:57 -07:00
dl-machine.h Save and restore vector registers in x86-64 ld.so 2015-08-25 04:34:13 -07:00
dl-procinfo.c Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
dl-runtime.c
dl-tls.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-tlsdesc.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-trampoline.h Save and restore vector registers in x86-64 ld.so 2015-08-25 04:34:13 -07:00
dl-trampoline.S Save and restore vector registers in x86-64 ld.so 2015-08-25 04:34:13 -07:00
ffs.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ffsll.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
hp-timing.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
htonl.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ifuncmain8.c Save and restore vector registers in x86-64 ld.so 2015-08-25 04:34:13 -07:00
ifuncmod8.c Save and restore vector registers in x86-64 ld.so 2015-08-25 04:34:13 -07:00
Implies
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
l10nflist.c
ldbl2mpn.c
ldsodefs.h Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
link-defines.sym Replace __int128 with __int128_t 2014-05-30 10:50:21 -07:00
locale-defines.sym
localplt.data Extend local PLT reference check 2015-07-29 11:58:06 -07:00
lshift.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Makefile Don't disable SSE in x86-64 ld.so 2015-08-26 07:55:42 -07:00
memchr.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memcmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memcpy_chk.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memcpy.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memmove.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
mempcpy_chk.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
mempcpy.S
memrchr.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memset_chk.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memset.S Replace %xmm8 with %xmm0 2015-08-25 08:48:34 -07:00
memusage.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
mp_clz_tab.c
mul_1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +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. 2015-01-02 16:29:47 +00:00
rshift.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sched_cpucount.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
setjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00: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. 2015-01-02 16:29:47 +00:00
start.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
stpcpy.S
strcasecmp_l-nonascii.c
strcasecmp_l.S
strcasecmp.S
strcat.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strchr.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strchrnul.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcmp.S Use SSE2 optimized strcmp in x86-64 ld.so 2015-08-25 12:38:11 -07:00
strcpy.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcspn.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strlen.S Replace %xmm[8-12] with %xmm[0-4] 2015-08-25 08:51:23 -07:00
strncase_l-nonascii.c
strncase_l.S
strncase.S
strncmp.S
strnlen.S Faster strlen on x64. 2013-03-18 07:39:12 +01:00
strpbrk.S
strrchr.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strspn.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strtok_r.S
strtok.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sub_n.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
submul_1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sysdep.h Start of series of patches with x86_64 vector math functions. 2015-06-09 14:25:49 +03:00
tls-macros.h
tlsdesc.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tlsdesc.sym
tst-audit3.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-audit4.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
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.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +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. 2015-01-02 16:29:47 +00:00
tst-auditmod10b.c Add la_symbind32 to x86-64 audit tests 2015-07-07 06:09:29 -07:00
tst-mallocalign1.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tst-quad1.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tst-quad1pie.c
tst-quad2.c
tst-quad2pie.c
tst-quadmod1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tst-quadmod1pie.S
tst-quadmod2.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tst-quadmod2pie.S
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. 2015-01-02 16:29:47 +00:00
Versions
wcschr.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wcscmp.S Fix regcomp wcscoll, wcscmp namespace (bug 18497). 2015-06-09 21:07:30 +00:00
wcslen.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wcsrchr.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00