glibc/sysdeps/x86_64
Joseph Myers da2f4f2dd5 Make scalbn set errno (bug 6803).
As noted in bug 6803, scalbn fails to set errno on overflow and
underflow.  This patch fixes this by making scalbn an alias of ldexp,
which has exactly the same semantics (for floating-point types with
radix 2) and already has wrappers that deal with setting errno,
instead of an alias of the internal __scalbn (which ldexp calls).

Notes:

* Where compat symbols were defined for scalbn functions, I didn't
  change what they point to (to keep the patch minimal), so such
  compat symbols continue to go directly to the non-errno-setting
  functions.

* Mike, I didn't do anything with the IA64 versions of these
  functions, where I think both the ldexp and scalbn functions already
  deal with setting errno.  As a cleanup (not needed to fix this bug)
  however you might want to make those functions into aliases for
  IA64; there is no need for them to be separate function
  implementations at all.

* This concludes the fix for bug 6803 since the scalb and scalbln
  cases of that bug were fixed some time ago.

Tested for x86_64, x86, mips64 and powerpc.

	[BZ #6803]
	* math/s_ldexp.c (scalbn): Define as weak alias of __ldexp.
	[NO_LONG_DOUBLE] (scalbnl): Define as weak alias of __ldexp.
	* math/s_ldexpf.c (scalbnf): Define as weak alias of __ldexpf.
	* math/s_ldexpl.c (scalbnl): Define as weak alias of __ldexpl.
	* sysdeps/i386/fpu/s_scalbn.S (scalbn): Remove alias.
	* sysdeps/i386/fpu/s_scalbnf.S (scalbnf): Likewise.
	* sysdeps/i386/fpu/s_scalbnl.S (scalbnl): Likewise.
	* sysdeps/ieee754/dbl-64/s_scalbn.c (scalbn): Likewise.
	[NO_LONG_DOUBLE] (scalbnl): Likewise.
	* sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c (scalbn):
	Likewise.
	[NO_LONG_DOUBLE] (scalbnl): Likewise.
	* sysdeps/ieee754/flt-32/s_scalbnf.c (scalbnf): Likewise.
	* sysdeps/ieee754/ldbl-128/s_scalbnl.c (scalbnl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c (scalbnl): Remove
	long_double_symbol calls.
	* sysdeps/ieee754/ldbl-64-128/s_scalbnl.c (scalbnl): Likewise.
	* sysdeps/ieee754/ldbl-opt/s_ldexpl.c (__ldexpl_2): Define as
	strong alias of __ldexpl.
	(scalbnl): Define using long_double_symbol.
	* sysdeps/m68k/m680x0/fpu/s_scalbn.c (__CONCATX(scalbn,suffix)):
	Remove alias.
	* sysdeps/sparc/sparc64/soft-fp/s_scalbnl.c (scalbnl): Likewise.
	* sysdeps/x86_64/fpu/s_scalbnl.S (scalbnl): Likewise.
	* math/libm-test.inc (scalbn_test_data): Add errno expectations.
	(scalbln_test_data): Add more errno expectations.
2015-09-16 21:11:00 +00:00
..
64 Move architecture shlib-versions files to Linux-specific directories. 2014-07-17 14:31:12 +00:00
fpu Make scalbn set errno (bug 6803). 2015-09-16 21:11:00 +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
Implies Use x86-64 bits/byteswap.h for both i386 and x86_64 2012-05-30 14:13:18 -07:00
Makefile Don't disable SSE in x86-64 ld.so 2015-08-26 07:55:42 -07:00
Versions Work around old buggy program which cannot cope with memcpy semantics. 2011-04-01 19:38:21 -04: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. 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 Update. 2001-09-19 10:37:31 +00:00
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 Make an empty file. 2007-10-16 05:59:15 +00:00
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 * elf/dl-runtime.c (reloc_offset): Define. 2009-03-15 00:26:14 +00:00
dl-tls.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-tlsdesc.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-trampoline.S Save and restore vector registers in x86-64 ld.so 2015-08-25 04:34:13 -07:00
dl-trampoline.h 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
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 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 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 Implement optimized strcaecmp for x86-64. 2010-07-30 00:14:04 -07:00
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
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.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
memmove.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
mempcpy.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
mempcpy_chk.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memrchr.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
memset_chk.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memusage.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +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. 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 Update. 2004-05-28 06:56:51 +00:00
strcasecmp.S Implement optimized strcaecmp for x86-64. 2010-07-30 00:14:04 -07: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
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.S Add optimized strncasecmp versions for x86-64. 2010-08-14 22:04:01 -07: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
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. 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.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strtok_r.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +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 Split tls-macros.h into sysdeps directories. 2012-07-17 11:30:58 +00:00
tlsdesc.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tlsdesc.sym Introduce TLS descriptors for i386 and x86_64. 2008-05-13 05:41:30 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
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-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 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. 2015-01-02 16:29:47 +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. 2015-01-02 16:29:47 +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. 2015-01-02 16:29:47 +00:00
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