summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog519
-rw-r--r--Makefile6
-rw-r--r--NEWS13
-rw-r--r--NOTES223
-rw-r--r--README4
-rw-r--r--aclocal.m46
-rw-r--r--config.make.in1
-rwxr-xr-xconfigure39
-rw-r--r--configure.in30
-rw-r--r--conform/conformtest.pl11
-rw-r--r--conform/run-conformtest.sh5
-rw-r--r--debug/backtracesyms.c2
-rw-r--r--debug/backtracesymsfd.c4
-rw-r--r--debug/segfault.c2
-rw-r--r--elf/dl-cache.c2
-rw-r--r--elf/dl-minimal.c2
-rw-r--r--elf/dl-misc.c2
-rw-r--r--elf/dl-sysdep.c2
-rw-r--r--elf/dl-version.c2
-rw-r--r--elf/rtld.c2
-rw-r--r--elf/tst-auditmod1.c18
-rw-r--r--elf/tst-auditmod3b.c18
-rw-r--r--elf/tst-auditmod4b.c18
-rw-r--r--elf/tst-auditmod5b.c18
-rw-r--r--elf/tst-auditmod6b.c18
-rw-r--r--elf/tst-auditmod6c.c18
-rw-r--r--elf/tst-auditmod7b.c18
-rw-r--r--grp/Makefile6
-rw-r--r--hurd/hurdsock.c2
-rw-r--r--hurd/lookup-retry.c2
-rw-r--r--include/link.h5
-rw-r--r--inet/Makefile5
-rw-r--r--login/Makefile5
-rw-r--r--malloc/malloc.c2
-rw-r--r--malloc/mtrace.c2
-rw-r--r--manual/creature.texi1
-rw-r--r--manual/intro.texi1
-rw-r--r--manual/lang.texi66
-rw-r--r--math/e_exp2l.c44
-rwxr-xr-xmath/gen-libm-test.pl4
-rw-r--r--math/libm-test.inc334
-rw-r--r--math/s_cexp.c31
-rw-r--r--math/s_cexpf.c31
-rw-r--r--math/s_cexpl.c31
-rw-r--r--math/w_exp2.c14
-rw-r--r--math/w_exp2f.c14
-rw-r--r--math/w_exp2l.c15
-rw-r--r--nptl/ChangeLog15
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h2
-rw-r--r--nptl/sysdeps/x86_64/pthreaddef.h2
-rw-r--r--nptl/unwind.c2
-rw-r--r--nscd/Makefile5
-rw-r--r--nscd/nscd_getgr_r.c2
-rw-r--r--nscd/nscd_getpw_r.c2
-rw-r--r--nscd/nscd_getserv_r.c2
-rw-r--r--nss/Makefile16
-rw-r--r--nss/getnssent.c4
-rw-r--r--posix/Makefile8
-rw-r--r--posix/confstr.c223
-rw-r--r--posix/getopt_init.c2
-rw-r--r--posix/wordexp.c2
-rw-r--r--pwd/Makefile5
-rw-r--r--resolv/Makefile4
-rw-r--r--rt/Makefile5
-rw-r--r--stdio-common/_itoa.c2
-rw-r--r--stdio-common/_itowa.c4
-rw-r--r--stdio-common/_itowa.h9
-rw-r--r--stdio-common/printf_fphex.c4
-rw-r--r--stdio-common/vfprintf.c4
-rw-r--r--string/_strerror.c2
-rw-r--r--sunrpc/Makefile5
-rw-r--r--sysdeps/generic/_itoa.h (renamed from stdio-common/_itoa.h)24
-rw-r--r--sysdeps/generic/ldsodefs.h11
-rw-r--r--sysdeps/i386/configure62
-rw-r--r--sysdeps/i386/configure.in48
-rw-r--r--sysdeps/i386/fpu/e_pow.S47
-rw-r--r--sysdeps/i386/fpu/e_powf.S47
-rw-r--r--sysdeps/i386/fpu/e_powl.S41
-rw-r--r--sysdeps/i386/fpu/libm-test-ulps123
-rw-r--r--sysdeps/i386/fpu/s_cexp.S253
-rw-r--r--sysdeps/i386/fpu/s_cexpf.S257
-rw-r--r--sysdeps/i386/fpu/s_cexpl.S256
-rw-r--r--sysdeps/i386/i686/hp-timing.h2
-rw-r--r--sysdeps/i386/start.S3
-rw-r--r--sysdeps/ieee754/dbl-64/Makefile4
-rw-r--r--sysdeps/ieee754/dbl-64/e_pow.c2
-rw-r--r--sysdeps/ieee754/ldbl-128/k_cosl.c6
-rw-r--r--sysdeps/ieee754/ldbl-128/k_sincosl.c6
-rw-r--r--sysdeps/ieee754/ldbl-128/k_sinl.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_expl.c4
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_powl.c4
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/k_cosl.c6
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/k_sincosl.c6
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/k_sinl.c2
-rw-r--r--sysdeps/ieee754/ldbl-opt/configure161
-rw-r--r--sysdeps/mach/_strerror.c2
-rw-r--r--sysdeps/mach/hurd/powerpc/register-dump.h2
-rw-r--r--sysdeps/mach/hurd/sethostid.c2
-rw-r--r--sysdeps/mach/hurd/xmknodat.c2
-rw-r--r--sysdeps/mach/xpg-strerror.c2
-rw-r--r--sysdeps/powerpc/configure103
-rw-r--r--sysdeps/powerpc/fpu/libm-test-ulps110
-rw-r--r--sysdeps/powerpc/powerpc32/configure114
-rw-r--r--sysdeps/powerpc/powerpc32/dl-machine.c2
-rw-r--r--sysdeps/powerpc/powerpc32/power4/hp-timing.h2
-rw-r--r--sysdeps/powerpc/powerpc32/register-dump.h2
-rw-r--r--sysdeps/powerpc/powerpc64/configure114
-rw-r--r--sysdeps/powerpc/powerpc64/dl-machine.c2
-rw-r--r--sysdeps/powerpc/powerpc64/hp-timing.h2
-rw-r--r--sysdeps/powerpc/powerpc64/register-dump.h2
-rw-r--r--sysdeps/sparc/fpu/fenv_private.h106
-rw-r--r--sysdeps/sparc/fpu/libm-test-ulps197
-rw-r--r--sysdeps/sparc/fpu/math_private.h63
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/hp-timing.h2
-rw-r--r--sysdeps/sparc/sparc64/hp-timing.h2
-rw-r--r--sysdeps/unix/sysv/linux/configure2
-rw-r--r--sysdeps/unix/sysv/linux/configure.in2
-rw-r--r--sysdeps/unix/sysv/linux/fd_to_filename.h2
-rw-r--r--sysdeps/unix/sysv/linux/futimes.c2
-rw-r--r--sysdeps/unix/sysv/linux/i386/register-dump.h2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/configure198
-rw-r--r--sysdeps/unix/sysv/linux/ptsname.c2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h2
-rw-r--r--sysdeps/unix/sysv/linux/sh/sh3/register-dump.h2
-rw-r--r--sysdeps/unix/sysv/linux/sh/sh4/register-dump.h2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h2
-rw-r--r--sysdeps/unix/sysv/linux/ttyname.c2
-rw-r--r--sysdeps/unix/sysv/linux/ttyname_r.c2
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed2
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/register-dump.h2
-rw-r--r--sysdeps/x86_64/bits/atomic.h14
-rw-r--r--sysdeps/x86_64/bits/link.h20
-rw-r--r--sysdeps/x86_64/bits/mathdef.h6
-rw-r--r--sysdeps/x86_64/bits/setjmp.h2
-rw-r--r--sysdeps/x86_64/dl-irel.h14
-rw-r--r--sysdeps/x86_64/dl-tls.h4
-rw-r--r--sysdeps/x86_64/dl-tlsdesc.h18
-rw-r--r--sysdeps/x86_64/fpu/bits/fenv.h5
-rw-r--r--sysdeps/x86_64/fpu/bits/mathinline.h8
-rw-r--r--sysdeps/x86_64/fpu/e_powl.S41
-rw-r--r--sysdeps/x86_64/fpu/libm-test-ulps56
-rw-r--r--sysdeps/x86_64/fpu/math_private.h4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/Makefile3
-rw-r--r--sysdeps/x86_64/fpu/multiarch/brandred-fma4.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c1
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c1
-rw-r--r--sysdeps/x86_64/jmpbuf-unwind.h4
-rw-r--r--sysdeps/x86_64/preconfigure162
-rw-r--r--sysdeps/x86_64/preconfigure.in20
-rw-r--r--timezone/Makefile5
152 files changed, 2883 insertions, 1898 deletions
diff --git a/ChangeLog b/ChangeLog
index e806afcbca..7fd0ea8b5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,522 @@
+2012-03-27 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/sparc64/Makefile (ASFLAGS-.os): Move before
+ have-as-vis3 check.
+
+2012-03-27 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/x86_64/elf/configure.in: Moved to ...
+ * sysdeps/x86_64/configure.in: ... here.
+ * sysdeps/x86_64/elf/start.S: Moved to ...
+ * sysdeps/x86_64/start.S: ... here.
+ * sysdeps/x86_64/elf/configure: Delete.
+
+ * sysdeps/x86_64/configure.in: Merge contents from
+ sysdeps/i386/configure.in (without i686 check).
+
+ * sysdeps/i386/elf/Versions: Merge into ...
+ * sysdeps/i386/Versions: ... this.
+ * sysdeps/i386/elf/Versions: Delete file.
+ * sysdeps/i386/elf/start.S: Moved to ...
+ * sysdeps/i386/start.S: ...here.
+ * sysdeps/i386/elf/configure.in: Merge into...
+ * sysdeps/i386/configure.in: ...here.
+ * sysdeps/i386/elf/configure.in: Delete file.
+ * sysdeps/i386/elf/configure: Delete file.
+
+ * sysdeps/generic/elf/backtracesyms.c: Moved to ...
+ * debug/backtracesyms.c: ... here.
+ * sysdeps/generic/elf/backtracesymsfd.c: Moved to ...
+ * debug/backtracesymsfd.c: ... here.
+ * sysdeps/generic/elf/ifunc-sel.h: Moved to ...
+ * sysdeps/generic/ifunc-sel.h: ... here.
+
+ * sysdeps/unix/i386/start.c: Delete file.
+ * sysdeps/unix/sparc/start.c: Delete file.
+ * sysdeps/unix/start.c: Delete file.
+
+ * sysdeps/sh/elf/configure.in: Moved to ...
+ * sysdeps/sh/configure.in: ... here.
+ * sysdeps/sh/elf/start.S: Moved to ...
+ * sysdeps/sh/start.S: ... here.
+ * sysdeps/sh/elf/configure: Delete file.
+
+ * sysdeps/powerpc/powerpc64/elf/bzero.S: Moved to ...
+ * sysdeps/powerpc/powerpc64/bzero.S: ... here.
+ * sysdeps/powerpc/powerpc64/elf/entry.h: Moved to ...
+ * sysdeps/powerpc/powerpc64/entry.h: ... here.
+ * sysdeps/powerpc/powerpc64/elf/start.S: Moved to ...
+ * sysdeps/powerpc/powerpc64/start.S: here.
+ * sysdeps/powerpc/powerpc64/elf/Makefile: Merge into ...
+ * sysdeps/powerpc/powerpc64/Makefile: ... this.
+ * sysdeps/powerpc/powerpc64/elf/configure.in: Merge into ...
+ * sysdeps/powerpc/powerpc64/configure.in: ... this.
+ * sysdeps/powerpc/powerpc64/elf/configure: Delete file.
+
+ * sysdeps/powerpc/powerpc32/elf/bzero.S: Moved to ...
+ * sysdeps/powerpc/powerpc32/bzero.S: ... here.
+ * sysdeps/powerpc/powerpc32/elf/start.S: Moved to ...
+ * sysdeps/powerpc/powerpc32/start.S: ... here.
+ * sysdeps/powerpc/powerpc32/elf/configure.in: Merge into ...
+ * sysdeps/powerpc/powerpc32/configure.in: ... this.
+ * sysdeps/powerpc/powerpc32/elf/configure: Delete file.
+
+ * sysdeps/powerpc/elf/ifunc-sel.h: Moved to ...
+ * sysdeps/powerpc/ifunc-sel.h: ... here.
+ * sysdeps/powerpc/elf/rtld-global-offsets.sym: Moved to ...
+ * sysdeps/powerpc/rtld-global-offsets.sym: ... here.
+
+ * sysdeps/sparc/elf/configure.in: Moved to ...
+ * sysdeps/sparc/configure.in: ... here.
+ * sysdeps/sparc/elf/configure: Delete file.
+ * sysdeps/sparc/sparc32/elf/start.S: Moved to ...
+ * sysdeps/sparc/sparc32/start.S: ... here.
+ * sysdeps/sparc/sparc64/elf/start.S: Moved to ...
+ * sysdeps/sparc/sparc64/start.S: ... here.
+ * sysdeps/sparc/sparc32/elf/Makefile: Merged into ...
+ * sysdeps/sparc/sparc32/Makefile: ... this.
+ * sysdeps/sparc/sparc64/elf/Makefile: Merged into ...
+ * sysdeps/sparc/sparc64/Makefile: ... this.
+
+ * sysdeps/s390/s390-32/elf/bsd-_setjmp.S: Moved to ...
+ * sysdeps/s390/s390-32/bsd-_setjmp.S: ... here.
+ * sysdeps/s390/s390-32/elf/bsd-setjmp.S: Moved to ...
+ * sysdeps/s390/s390-32/bsd-setjmp.S: ... here.
+ * sysdeps/s390/s390-32/elf/setjmp.S: Moved to ...
+ * sysdeps/s390/s390-32/setjmp.S: ... here.
+ * sysdeps/s390/s390-32/elf/configure.in: Moved to ...
+ * sysdeps/s390/s390-32/configure.in: ... here.
+ * sysdeps/s390/s390-32/elf/configure: Delete file.
+ * sysdeps/s390/s390-32/elf/start.S: Moved to ...
+ * sysdeps/s390/s390-32/start.S: ... here.
+
+ * sysdeps/s390/s390-64/elf/bsd-_setjmp.S: Moved to ...
+ * sysdeps/s390/s390-64/bsd-_setjmp.S: ... here.
+ * sysdeps/s390/s390-64/elf/bsd-setjmp.S: Moved to ...
+ * sysdeps/s390/s390-64/bsd-setjmp.S: ... here.
+ * sysdeps/s390/s390-64/elf/setjmp.S: Moved to ...
+ * sysdeps/s390/s390-64/setjmp.S: ... here.
+ * sysdeps/s390/s390-64/elf/configure.in: Moved to ...
+ * sysdeps/s390/s390-64/configure.in: ... here
+ * sysdeps/s390/s390-64/elf/configure: Delete file.
+ * sysdeps/s390/s390-64/elf/start.S: Moved to ...
+ * sysdeps/s390/s390-64/start.S: ... here.
+ * sysdeps/s390/s390-64/elf/configure: Delete.
+
+ * configure.in: Remove support for elf directories in sysdeps.
+
+ * configure: Regenerated.
+ * sysdeps/i386/configure: Regenerated.
+ * sysdeps/powerpc/powerpc32/configure: Regenerated.
+ * sysdeps/powerpc/powerpc64/configure: Regenerated.
+ * sysdeps/s390/s390-32/configure: Regenerated.
+ * sysdeps/s390/s390-64/configure: Regenerated.
+ * sysdeps/sh/configure: Regenerated.
+ * sysdeps/sparc/configure: Regenerated.
+ * sysdeps/x86_64/configure: Regenerated.
+
+2012-03-26 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/powerpc/fpu/libm-test-ulps: Update.
+
+ * sysdeps/ieee754/ldbl-128ibm/e_expl.c (lomark): Adjust to take
+ denormal result into account.
+
+2012-03-25 Roland McGrath <roland@hack.frob.com>
+
+ * posix/confstr.c (confstr): Lift RESTENVS definition to function scope.
+ Reported by Allan McRae <allan@archlinux.org>.
+
+2012-03-23 Jeff Law <law@redhat.com>
+
+ * nss/getnssent.c (__nss_getent): Fix typo.
+
+2012-03-23 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/fpu/libm-test-ulps: Update.
+
+2012-03-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/dl-tlsdesc.h (tlsdesc): Use anonymous union
+ to pad to uint64_t for each field.
+ (dl_tls_index): Replace unsigned long with uint64_t.
+
+2012-03-23 Daniel Jacobowitz <dmj@google.com>
+ Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ [BZ #6528]
+ * grp/Makefile (otherlibs): Don't set it.
+ * inet/Makefile (otherlibs): Likewise.
+ * login/Makefile (otherlibs): Likewise.
+ * nscd/Makefile (otherlibs): Likewise.
+ * posix/Makefile (otherlibs): Likewise.
+ * pwd/Makefile (otherlibs): Likewise.
+ * rt/Makefile (otherlibs): Likewise.
+ * sunrpc/Makefile (otherlibs): Likewise.
+ * nss/Makefile (otherlibs): Likewise.
+ Add libnss_files to routines and static-only-routines.
+ ($(objpfx)getent): Remove rule.
+ * resolv/Makefile: Add libnss_dns and libresolv to routines and
+ static-only-routines.
+
+2012-03-22 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #13892]
+ * math/s_cexp.c: Include <float.h>.
+ (__cexp): Handle exp result overflowing not necessarily
+ overflowing both real and imaginary parts of result.
+ * math/s_cexpf.c: Likewise.
+ * math/s_cexpl.c: Likewise.
+ * math/libm-test.inc (cexp_test): Add more tests.
+ * sysdeps/i386/fpu/libm-test-ulps: Update.
+ * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
+2012-03-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * include/link.h (ELFW): New macro.
+ * sysdeps/x86_64/dl-irel.h: Replace Elf64_XXX with ElfW(XXX).
+ Replace ELF64_R_TYPE with ELFW(R_TYPE).
+
+2012-03-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/dl-tls.h (dl_tls_index): Replace unsigned long
+ with uint64_t.
+
+2012-03-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/generic/ldsodefs.h (struct La_x32_regs): New forward
+ declaration.
+ (struct La_x32_retval): Likewise.
+
+2012-03-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/preconfigure.in: New file.
+ * sysdeps/x86_64/preconfigure: New generated file.
+
+2012-03-22 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #13824]
+ * math/e_exp2l.c: Include <float.h>.
+ (__ieee754_exp2l): Handle overflow and underflow cases
+ separately. Only pass fractional part of argument to
+ __ieee754_expl.
+ * math/libm-test.inc (exp2_test): Add more tests.
+
+ * sysdeps/ieee754/ldbl-128/k_cosl.c (__kernel_cosl): Negate y if
+ negating x to take absolute value.
+ * sysdeps/ieee754/ldbl-128/k_sincosl.c (__kernel_sincosl):
+ Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/k_cosl.c (__kernel_cosl): Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c (__kernel_sincosl):
+ Likewise.
+ * sysdeps/ieee754/ldbl-128/k_sinl.c (__kernel_sinl): Negate y when
+ computing low part if x was negated.
+ * sysdeps/ieee754/ldbl-128ibm/k_sinl.c (__kernel_sinl): Likewise.
+
+2012-03-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf/tst-auditmod1.c: Support la_x32_gnu_pltenter and
+ la_x32_gnu_pltexit.
+ (pltexit): Cast int_retval to ptrdiff_t.
+ * elf/tst-auditmod3b.c: Likewise.
+ * elf/tst-auditmod4b.c: Likewise.
+ * elf/tst-auditmod5b.c: Likewise.
+ * elf/tst-auditmod6b.c: Likewise.
+ * elf/tst-auditmod6c.c: Likewise.
+ * elf/tst-auditmod7b.c: Likewise.
+
+ * sysdeps/generic/ldsodefs.h (audit_ifaces): Add x32_gnu_pltenter
+ and x32_gnu_pltexit.
+
+ * sysdeps/x86_64/bits/link.h: Check __x86_64__ instead of
+ __ELF_NATIVE_CLASS.
+ (La_x32_regs): New macro.
+ (La_x32_retval): Likewise.
+ (la_x32_gnu_pltenter): New function prototype.
+ (la_x32_gnu_pltexit): Likewise.
+
+2012-03-21 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/ieee754/ldbl-128ibm/e_powl.c (huge, tiny): Correct
+ exponent.
+
+ * sysdeps/powerpc/fpu/libm-test-ulps: Update.
+
+ * configure.in (libc_cv_cc_nofma): Check for option to disable
+ generation of FMA instructions.
+ * configure: Regenerate.
+ * config.make.in (config-cflags-nofma): Set from libc_cv_cc_nofma.
+ * sysdeps/ieee754/dbl-64/Makefile: New file.
+ * sysdeps/x86_64/fpu/multiarch/Makefile (libm-sysdep_routines):
+ Remove brandred-fma4.
+ (CFLAGS-brandred-fma4.c): Remove.
+ * sysdeps/x86_64/fpu/multiarch/brandred-fma4.c: Remove.
+ * sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c (__branred): Don't
+ define.
+ * sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c (__branred): Don't
+ define.
+
+2012-03-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * stdio-common/_itoa.c: Check _ITOA_NEEDED instead of
+ LLONG_MAX != LONG_MAX.
+ (_itoa_word): Use _ITOA_WORD_TYPE on value.
+ (_fitoa_word): Likewise.
+ * stdio-common/_itowa.c: Check _ITOA_NEEDED instead of
+ LLONG_MAX != LONG_MAX.
+ * stdio-common/_itowa.h: Include <_itoa.h>.
+ (_itowa_word): Use _ITOA_WORD_TYPE on value.
+ (_itowa): New macro. Defined only if _ITOA_NEEDED is false.
+ * sysdeps/generic/_itoa.h (_ITOA_NEEDED): New macro. Defined
+ only if not defined.
+ (_ITOA_WORD_TYPE): Likewise.
+ (_itoa_word): Use _ITOA_WORD_TYPE on value.
+ Check !_ITOA_NEEDED instead of LONG_MAX == LLONG_MAX.
+
+2012-03-21 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/fpu/libm-test-ulps: Update.
+
+2012-03-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/unix/sysv/linux/configure.in: Check x86_64* instead
+ of x86_64 when setting libc_cv_slibdir, libdir and
+ libc_cv_localedir.
+ * sysdeps/unix/sysv/linux/configure: Regenerated.
+
+2012-03-21 Joseph Myers <joseph@codesourcery.com>
+
+ * manual/lang.texi (Old Varargs): Remove section.
+ (How Variadic): Update menu.
+ (va_start): Do not mention varargs.h.
+
+2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * configure.in (libc_cv_ssp): Use LIBC_TRY_CC_OPTION instead of a
+ link test.
+ * configure: Regenerated.
+
+2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
+
+ * conform/conformtest.pl: Handle --tmpdir argument, defaulting to /tmp.
+ * conform/run-conformtest.sh: Pass --tmpdir argument when invoking
+ conformtest.pl
+
+2012-03-21 Joseph Myers <joseph@codesourcery.com>
+
+ * NOTES: Remove.
+ * Makefile (files-for-dist): Remove NOTES.
+ (NOTES): Remove rule.
+ * README: Don't refer to NOTES.
+ * manual/creature.texi: Don't include macros.texi.
+ * manual/intro.texi (creature.texi): Remove comment referring to
+ NOTES.
+
+ * aclocal.m4 (LIBC_TRY_CC_OPTION): New macro.
+ * configure.in (libc_cv_cc_submachine): Use LIBC_TRY_CC_OPTION.
+ * configure: Regenerated.
+ * sysdeps/i386/configure.in (libc_cv_cc_sse4): Use
+ LIBC_TRY_CC_OPTION.
+ (libc_cv_as_i686): Likewise.
+ (libc_cv_cc_avx): Likewise.
+ (libc_cv_cc_sse2avx): Likewise.
+ (libc_cv_cc_fma4): Likewise.
+ (libc_cv_cc_novzeroupper): Likewise.
+ * sysdeps/i386/configure: Regenerated.
+
+ [BZ #13883]
+ * sysdeps/i386/fpu/s_cexp.S: Remove.
+ * sysdeps/i386/fpu/s_cexpf.S: Likewise.
+ * sysdeps/i386/fpu/s_cexpl.S: Likewise.
+ * math/libm-test.inc (cexp_test): Add more tests.
+ * sysdeps/i386/fpu/libm-test-ulps: Update.
+ * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
+2012-03-21 Allan McRae <allan@archlinux.org>
+
+ * timezone/Makefile: Do not install iso3166.tab and zone.tab
+
+2012-03-21 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #13871]
+ * math/w_exp2.c: Do not include <float.h>.
+ (o_threshold, u_threshold): Remove.
+ (__exp2): Calculate result before checking finiteness and calling
+ __kernel_standard.
+ * math/w_exp2f.c: Likewise.
+ * math/w_exp2l.c: Likewise.
+ * math/libm-test.inc (exp2_test): Require overflow exception for
+ 1e6 input.
+
+ [BZ #3866]
+ * sysdeps/i386/fpu/e_pow.S (__ieee754_pow): Test for y outside the
+ range of signed 64-bit integers before using fistpll. Remove
+ checks for whether integers fit in mantissa bits.
+ * sysdeps/i386/fpu/e_powf.S (__ieee754_powf): Test for y outside
+ the range of signed 32-bit integers before using fistpl. Remove
+ checks for whether integers fit in mantissa bits.
+ * sysdeps/i386/fpu/e_powl.S (p64): New object.
+ (__ieee754_powl): Test for y outside the range of signed 64-bit
+ integers before using fistpll. Reduce 64-bit values to 63-bit
+ ones as needed.
+ * sysdeps/ieee754/dbl-64/e_pow.c (__ieee754_pow): Ensure
+ divide-by-zero is raised for zero to large negative powers.
+ * sysdeps/x86_64/fpu/e_powl.S (p64): New object.
+ (__ieee754_powl): Test for y outside the range of signed 64-bit
+ integers before using fistpll. Reduce 64-bit values to 63-bit
+ ones as needed.
+ * math/libm-test.inc (pow_test): Add more tests.
+
+2012-03-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ * debug/backtracesymsfd.c: Include <_itoa.h> instead of
+ <stdio-common/_itoa.h>.
+ * debug/segfault.c: Likewise.
+ * elf/dl-cache.c: Likewise.
+ * elf/dl-minimal.c: Likewise.
+ * elf/dl-misc.c: Likewise.
+ * elf/dl-sysdep.c: Likewise.
+ * elf/dl-version.c: Likewise.
+ * elf/rtld.c: Likewise.
+ * hurd/hurdsock.c: Likewise.
+ * hurd/lookup-retry.c: Likewise.
+ * malloc/malloc.c: Likewise.
+ * malloc/mtrace.c: Likewise.
+ * nscd/nscd_getgr_r.c: Likewise.
+ * nscd/nscd_getpw_r.c: Likewise.
+ * nscd/nscd_getserv_r.c: Likewise.
+ * posix/getopt_init.c: Likewise.
+ * posix/wordexp.c: Likewise.
+ * stdio-common/_itoa.c: Likewise.
+ * stdio-common/printf_fphex.c: Likewise.
+ * stdio-common/vfprintf.c: Likewise.
+ * string/_strerror.c: Likewise.
+ * sysdeps/generic/elf/backtracesymsfd.c: Likewise.
+ * sysdeps/i386/i686/hp-timing.h: Likewise.
+ * sysdeps/mach/_strerror.c: Likewise.
+ * sysdeps/mach/hurd/powerpc/register-dump.h: Likewise.
+ * sysdeps/mach/hurd/sethostid.c: Likewise.
+ * sysdeps/mach/hurd/xmknodat.c: Likewise.
+ * sysdeps/mach/xpg-strerror.c: Likewise.
+ * sysdeps/powerpc/powerpc32/dl-machine.c: Likewise.
+ * sysdeps/powerpc/powerpc32/power4/hp-timing.h: Likewise.
+ * sysdeps/powerpc/powerpc32/register-dump.h: Likewise.
+ * sysdeps/powerpc/powerpc64/dl-machine.c: Likewise.
+ * sysdeps/powerpc/powerpc64/hp-timing.h: Likewise.
+ * sysdeps/powerpc/powerpc64/register-dump.h: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/hp-timing.h: Likewise.
+ * sysdeps/sparc/sparc64/hp-timing.h: Likewise.
+ * sysdeps/unix/sysv/linux/fd_to_filename.h: Likewise.
+ * sysdeps/unix/sysv/linux/futimes.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/register-dump.h: Likewise.
+ * sysdeps/unix/sysv/linux/ptsname.c: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h: Likewise.
+ * sysdeps/unix/sysv/linux/sh/sh3/register-dump.h: Likewise.
+ * sysdeps/unix/sysv/linux/sh/sh4/register-dump.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h: Likewise.
+ * sysdeps/unix/sysv/linux/ttyname.c: Likewise.
+ * sysdeps/unix/sysv/linux/ttyname_r.c: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/register-dump.h: Likewise.
+
+ * stdio-common/_itoa.c: Include <_itoa.h> instead of "_itoa.h".
+
+ * stdio-common/_itoa.h: Moved to ...
+ * sysdeps/generic/_itoa.h: Here.
+
+ * stdio-common/_itowa.c: Include <_itowa.h> instead of "_itowa.h".
+
+ * stdio-common/printf_fphex.c: Include <_itoa.h> and <_itowa.h>
+ instead of "_itoa.h" and "_itowa.h".
+ * stdio-common/vfprintf.: Likewise.
+
+2012-03-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/fpu/bits/mathinline.h: Don't include
+ <bits/wordsize.h>.
+ (__signbitf): Check __x86_64__ instead of __WORDSIZE.
+ (__signbit): Likwise.
+ (llrintf): Likwise.
+ (llrint): Likwise.
+
+2012-03-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/bits/setjmp.h (__jmp_buf): Support x86-64 with
+ __WORDSIZE != 64.
+
+2012-03-20 Joseph Myers <joseph@codesourcery.com>
+
+ * math/gen-libm-test.pl (%beautify): Add OVERFLOW_EXCEPTION and
+ OVERFLOW_EXCEPTION_OK.
+ * math/libm-test.inc ("Philosophy"): Update comment about
+ exception testing.
+ (OVERFLOW_EXCEPTION): Define.
+ (OVERFLOW_EXCEPTION_OK): Likewise.
+ (INVALID_EXCEPTION_OK): Renumber.
+ (DIVIDE_BY_ZERO_EXCEPTION_OK): Likewise.
+ (IGNORE_ZERO_INF_SIGN): Likewise.
+ (test_exceptions): Handle FE_OVERFLOW.
+ (exp10_test): Expect overflow exceptions.
+ (exp2_test): Likewise.
+ (expm1_test): Likewise.
+ (nextafter_test): Likewise.
+ (pow_test): Likewise.
+ (scalbn_test): Likewise.
+ (scalbln_test): Likewise.
+
+2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/bits/atomic.h
+ (__arch_c_compare_and_exchange_val_64_acq): Use atomic64_t on
+ 64bit integer.
+ (atomic_exchange_acq): Likewise.
+ (__arch_exchange_and_add_body): Likewise.
+ (__arch_add_body): Likewise.
+ (atomic_add_negative): Likewise.
+ (atomic_add_zero): Likewise.
+
+2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/fpu/bits/fenv.h: Don't include <bits/wordsize.h>.
+ (fenv_t): Check __x86_64__ instead of __WORDSIZE.
+
+2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/bits/mathdef.h: Don't include <bits/wordsize.h>.
+ Check __x86_64__ instead of __WORDSIZE.
+
+2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed: Support x32.
+
+2012-03-19 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/fpu/libm-test-ulps: Update.
+
+ * sysdeps/sparc/fpu/fenv_private.h: New file.
+ * sysdeps/sparc/fpu/math_private.h: Use it.
+ (libc_feholdexcept, libc_feholdexceptf, libc_feholdexceptl):
+ Remove.
+ (libc_feholdexcept_setround, libc_feholdexcept_setroundf,
+ (libc_feholdexcept_setroundl): Remove.
+ (libc_fetestexcept, libc_fetestexceptf, libc_fetestexceptl):
+ Remove.
+ (libc_fesetenv, libc_fesetenvf, libc_fesetenvl): Remove.
+ (libc_feupdateenv, libc_feupdateenvf, libc_feupdateenvf): Remove.
+
+2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/fpu/math_private.h (EXTRACT_WORDS64): Use
+ int64_t instead of long int.
+ (INSERT_WORDS64): Likwise.
+
+2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/jmpbuf-unwind.h (_JMPBUF_CFA_UNWINDS_ADJ): Cast
+ _Unwind_GetCFA return to _Unwind_Ptr first.
+
2012-03-19 Joseph Myers <joseph@codesourcery.com>
[BZ #13629]
diff --git a/Makefile b/Makefile
index 5a31adba9e..fc6001d1fd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,4 @@
-# Copyright (C) 1991-2002,2003,2004,2005,2006,2008,2009,2011
-# Free Software Foundation, Inc.
+# Copyright (C) 1991-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -364,7 +363,7 @@ TAGS:
generated := $(generated) stubs.h
-files-for-dist := README FAQ INSTALL NOTES configure ChangeLog NEWS
+files-for-dist := README FAQ INSTALL configure ChangeLog NEWS
# Regenerate stuff, then error if these things are not committed yet.
dist-prepare: $(files-for-dist)
@@ -399,7 +398,6 @@ makeinfo --no-validate --plaintext --no-number-sections $< -o $@
-chmod a-w $@
endef
INSTALL: manual/install.texi manual/macros.texi; $(format-me)
-NOTES: manual/creature.texi manual/macros.texi; $(format-me)
manual/dir-add.texi manual/dir-add.info: FORCE
$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
FAQ: scripts/gen-FAQ.pl FAQ.in
diff --git a/NEWS b/NEWS
index df8e1f03a6..e54abbef05 100644
--- a/NEWS
+++ b/NEWS
@@ -11,12 +11,13 @@ Version 2.16
174, 350, 411, 2541, 2547, 2548, 2551, 2552, 2553, 2554, 2562, 2563, 2565,
2566, 2576, 3335, 3976, 3992, 4026, 4108, 4596, 4822, 5077, 5461, 5805,
- 5993, 6471, 6884, 6907, 6911, 9739, 9902, 10110, 10135, 10140, 10210,
- 10545, 10716, 11174, 11322, 11365, 11451, 11494, 12047, 13058, 13525,
- 13526, 13527, 13528, 13529, 13530, 13531, 13532, 13533, 13547, 13551,
- 13552, 13553, 13555, 13559, 13566, 13583, 13618, 13637, 13656, 13658,
- 13673, 13695, 13704, 13706, 13726, 13738, 13786, 13792, 13806, 13840,
- 13841, 13844, 13846, 13851, 13852, 13854
+ 5993, 6471, 6730, 6884, 6907, 6911, 9739, 9902, 10110, 10135, 10140,
+ 10210, 10545, 10716, 11174, 11322, 11365, 11451, 11494, 12047, 13058,
+ 13525, 13526, 13527, 13528, 13529, 13530, 13531, 13532, 13533, 13547,
+ 13551, 13552, 13553, 13555, 13559, 13566, 13583, 13618, 13637, 13656,
+ 13658, 13673, 13695, 13704, 13706, 13726, 13738, 13786, 13792, 13806,
+ 13824, 13840, 13841, 13844, 13846, 13851, 13852, 13854, 13871, 13883,
+ 13892
* ISO C11 support:
diff --git a/NOTES b/NOTES
deleted file mode 100644
index 552f4cd609..0000000000
--- a/NOTES
+++ /dev/null
@@ -1,223 +0,0 @@
-Feature Test Macros
--------------------
-
-The exact set of features available when you compile a source file is
-controlled by which "feature test macros" you define.
-
- If you compile your programs using `gcc -ansi', you get only the
-ISO C library features, unless you explicitly request additional
-features by defining one or more of the feature macros. *Note GNU CC
-Command Options: (gcc.info)Invoking GCC, for more information about GCC
-options.
-
- You should define these macros by using `#define' preprocessor
-directives at the top of your source code files. These directives
-_must_ come before any `#include' of a system header file. It is best
-to make them the very first thing in the file, preceded only by
-comments. You could also use the `-D' option to GCC, but it's better
-if you make the source files indicate their own meaning in a
-self-contained way.
-
- This system exists to allow the library to conform to multiple
-standards. Although the different standards are often described as
-supersets of each other, they are usually incompatible because larger
-standards require functions with names that smaller ones reserve to the
-user program. This is not mere pedantry -- it has been a problem in
-practice. For instance, some non-GNU programs define functions named
-`getline' that have nothing to do with this library's `getline'. They
-would not be compilable if all features were enabled indiscriminately.
-
- This should not be used to verify that a program conforms to a
-limited standard. It is insufficient for this purpose, as it will not
-protect you from including header files outside the standard, or
-relying on semantics undefined within the standard.
-
- -- Macro: _POSIX_SOURCE
- If you define this macro, then the functionality from the POSIX.1
- standard (IEEE Standard 1003.1) is available, as well as all of the
- ISO C facilities.
-
- The state of `_POSIX_SOURCE' is irrelevant if you define the macro
- `_POSIX_C_SOURCE' to a positive integer.
-
- -- Macro: _POSIX_C_SOURCE
- Define this macro to a positive integer to control which POSIX
- functionality is made available. The greater the value of this
- macro, the more functionality is made available.
-
- If you define this macro to a value greater than or equal to `1',
- then the functionality from the 1990 edition of the POSIX.1
- standard (IEEE Standard 1003.1-1990) is made available.
-
- If you define this macro to a value greater than or equal to `2',
- then the functionality from the 1992 edition of the POSIX.2
- standard (IEEE Standard 1003.2-1992) is made available.
-
- If you define this macro to a value greater than or equal to
- `199309L', then the functionality from the 1993 edition of the
- POSIX.1b standard (IEEE Standard 1003.1b-1993) is made available.
-
- Greater values for `_POSIX_C_SOURCE' will enable future extensions.
- The POSIX standards process will define these values as necessary,
- and the GNU C Library should support them some time after they
- become standardized. The 1996 edition of POSIX.1 (ISO/IEC 9945-1:
- 1996) states that if you define `_POSIX_C_SOURCE' to a value
- greater than or equal to `199506L', then the functionality from
- the 1996 edition is made available.
-
- -- Macro: _BSD_SOURCE
- If you define this macro, functionality derived from 4.3 BSD Unix
- is included as well as the ISO C, POSIX.1, and POSIX.2 material.
-
- Some of the features derived from 4.3 BSD Unix conflict with the
- corresponding features specified by the POSIX.1 standard. If this
- macro is defined, the 4.3 BSD definitions take precedence over the
- POSIX definitions.
-
- Due to the nature of some of the conflicts between 4.3 BSD and
- POSIX.1, you need to use a special "BSD compatibility library"
- when linking programs compiled for BSD compatibility. This is
- because some functions must be defined in two different ways, one
- of them in the normal C library, and one of them in the
- compatibility library. If your program defines `_BSD_SOURCE', you
- must give the option `-lbsd-compat' to the compiler or linker when
- linking the program, to tell it to find functions in this special
- compatibility library before looking for them in the normal C
- library.
-
- -- Macro: _SVID_SOURCE
- If you define this macro, functionality derived from SVID is
- included as well as the ISO C, POSIX.1, POSIX.2, and X/Open
- material.
-
- -- Macro: _XOPEN_SOURCE
- -- Macro: _XOPEN_SOURCE_EXTENDED
- If you define this macro, functionality described in the X/Open
- Portability Guide is included. This is a superset of the POSIX.1
- and POSIX.2 functionality and in fact `_POSIX_SOURCE' and
- `_POSIX_C_SOURCE' are automatically defined.
-
- As the unification of all Unices, functionality only available in
- BSD and SVID is also included.
-
- If the macro `_XOPEN_SOURCE_EXTENDED' is also defined, even more
- functionality is available. The extra functions will make all
- functions available which are necessary for the X/Open Unix brand.
-
- If the macro `_XOPEN_SOURCE' has the value 500 this includes all
- functionality described so far plus some new definitions from the
- Single Unix Specification, version 2.
-
- -- Macro: _LARGEFILE_SOURCE
- If this macro is defined some extra functions are available which
- rectify a few shortcomings in all previous standards.
- Specifically, the functions `fseeko' and `ftello' are available.
- Without these functions the difference between the ISO C interface
- (`fseek', `ftell') and the low-level POSIX interface (`lseek')
- would lead to problems.
-
- This macro was introduced as part of the Large File Support
- extension (LFS).
-
- -- Macro: _LARGEFILE64_SOURCE
- If you define this macro an additional set of functions is made
- available which enables 32 bit systems to use files of sizes beyond
- the usual limit of 2GB. This interface is not available if the
- system does not support files that large. On systems where the
- natural file size limit is greater than 2GB (i.e., on 64 bit
- systems) the new functions are identical to the replaced functions.
-
- The new functionality is made available by a new set of types and
- functions which replace the existing ones. The names of these new
- objects contain `64' to indicate the intention, e.g., `off_t' vs.
- `off64_t' and `fseeko' vs. `fseeko64'.
-
- This macro was introduced as part of the Large File Support
- extension (LFS). It is a transition interface for the period when
- 64 bit offsets are not generally used (see `_FILE_OFFSET_BITS').
-
- -- Macro: _FILE_OFFSET_BITS
- This macro determines which file system interface shall be used,
- one replacing the other. Whereas `_LARGEFILE64_SOURCE' makes the
- 64 bit interface available as an additional interface,
- `_FILE_OFFSET_BITS' allows the 64 bit interface to replace the old
- interface.
-
- If `_FILE_OFFSET_BITS' is undefined, or if it is defined to the
- value `32', nothing changes. The 32 bit interface is used and
- types like `off_t' have a size of 32 bits on 32 bit systems.
-
- If the macro is defined to the value `64', the large file interface
- replaces the old interface. I.e., the functions are not made
- available under different names (as they are with
- `_LARGEFILE64_SOURCE'). Instead the old function names now
- reference the new functions, e.g., a call to `fseeko' now indeed
- calls `fseeko64'.
-
- This macro should only be selected if the system provides
- mechanisms for handling large files. On 64 bit systems this macro
- has no effect since the `*64' functions are identical to the
- normal functions.
-
- This macro was introduced as part of the Large File Support
- extension (LFS).
-
- -- Macro: _ISOC99_SOURCE
- Until the revised ISO C standard is widely adopted the new features
- are not automatically enabled. The GNU C Library nevertheless has
- a complete implementation of the new standard and to enable the
- new features the macro `_ISOC99_SOURCE' should be defined.
-
- -- Macro: _GNU_SOURCE
- If you define this macro, everything is included: ISO C89,
- ISO C99, POSIX.1, POSIX.2, BSD, SVID, X/Open, LFS, and GNU
- extensions. In the cases where POSIX.1 conflicts with BSD, the
- POSIX definitions take precedence.
-
- If you want to get the full effect of `_GNU_SOURCE' but make the
- BSD definitions take precedence over the POSIX definitions, use
- this sequence of definitions:
-
- #define _GNU_SOURCE
- #define _BSD_SOURCE
- #define _SVID_SOURCE
-
- Note that if you do this, you must link your program with the BSD
- compatibility library by passing the `-lbsd-compat' option to the
- compiler or linker. *NB:* If you forget to do this, you may get
- very strange errors at run time.
-
- -- Macro: _REENTRANT
- -- Macro: _THREAD_SAFE
- If you define one of these macros, reentrant versions of several
- functions get declared. Some of the functions are specified in
- POSIX.1c but many others are only available on a few other systems
- or are unique to the GNU C Library. The problem is the delay in
- the standardization of the thread safe C library interface.
-
- Unlike on some other systems, no special version of the C library
- must be used for linking. There is only one version but while
- compiling this it must have been specified to compile as thread
- safe.
-
- We recommend you use `_GNU_SOURCE' in new programs. If you don't
-specify the `-ansi' option to GCC and don't define any of these macros
-explicitly, the effect is the same as defining `_POSIX_C_SOURCE' to 2
-and `_POSIX_SOURCE', `_SVID_SOURCE', and `_BSD_SOURCE' to 1.
-
- When you define a feature test macro to request a larger class of
-features, it is harmless to define in addition a feature test macro for
-a subset of those features. For example, if you define
-`_POSIX_C_SOURCE', then defining `_POSIX_SOURCE' as well has no effect.
-Likewise, if you define `_GNU_SOURCE', then defining either
-`_POSIX_SOURCE' or `_POSIX_C_SOURCE' or `_SVID_SOURCE' as well has no
-effect.
-
- Note, however, that the features of `_BSD_SOURCE' are not a subset of
-any of the other feature test macros supported. This is because it
-defines BSD features that take precedence over the POSIX features that
-are requested by the other macros. For this reason, defining
-`_BSD_SOURCE' in addition to the other feature test macros does have an
-effect: it causes the BSD features to take priority over the conflicting
-POSIX features.
-
diff --git a/README b/README
index 728e7d7da8..a4e39333c1 100644
--- a/README
+++ b/README
@@ -84,10 +84,6 @@ following the bug-reporting instructions below. Please be sure to check
the manual in the current development sources to see if your problem has
already been corrected.
-The file NOTES contains a description of the feature-test macros used
-in the GNU C library, explaining how you can tell the library what
-facilities you want it to make available.
-
Please see http://www.gnu.org/software/libc/bugs.html for bug reporting
information. We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.
diff --git a/aclocal.m4 b/aclocal.m4
index fb546e46c1..e89993237f 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -128,6 +128,12 @@ AS_IF([AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest
[$2], [$3])
rm -f conftest*])
+dnl Test a compiler option or options with an empty input file.
+dnl LIBC_TRY_CC_OPTION([options], [action-if-true], [action-if-false])
+AC_DEFUN([LIBC_TRY_CC_OPTION],
+[AS_IF([AC_TRY_COMMAND([${CC-cc} $1 -xc /dev/null -S -o /dev/null])],
+ [$2], [$3])])
+
dnl Find and source sysdeps/*/preconfigure.
dnl LIBC_PRECONFIGURE([$srcdir], [for])
AC_DEFUN([LIBC_PRECONFIGURE], [dnl
diff --git a/config.make.in b/config.make.in
index 2b9a939e9b..54e83934af 100644
--- a/config.make.in
+++ b/config.make.in
@@ -38,6 +38,7 @@ config-cflags-sse4 = @libc_cv_cc_sse4@
config-cflags-avx = @libc_cv_cc_avx@
config-cflags-sse2avx = @libc_cv_cc_sse2avx@
config-cflags-novzeroupper = @libc_cv_cc_novzeroupper@
+config-cflags-nofma = @libc_cv_cc_nofma@
config-asflags-i686 = @libc_cv_as_i686@
defines = @DEFINES@
diff --git a/configure b/configure
index 3eb7cf14f1..194c4ed984 100755
--- a/configure
+++ b/configure
@@ -618,6 +618,7 @@ ldd_rewrite_script
use_ldconfig
libc_cv_sparc_as_vis3
libc_cv_as_i686
+libc_cv_cc_nofma
libc_cv_cc_fma4
libc_cv_cc_novzeroupper
libc_cv_cc_sse2avx
@@ -6643,23 +6644,17 @@ $as_echo_n "checking for -fstack-protector... " >&6; }
if ${libc_cv_ssp+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat > conftest.c <<EOF
-int foo;
-main () { return 0;}
-EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -Werror -fstack-protector
- -o conftest conftest.c 1>&5'
+ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector -xc /dev/null -S -o /dev/null'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }
-then
+ test $ac_status = 0; }; }; then :
libc_cv_ssp=yes
else
libc_cv_ssp=no
fi
-rm -f conftest*
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ssp" >&5
$as_echo "$libc_cv_ssp" >&6; }
@@ -7041,6 +7036,26 @@ if test "$libc_cv_gcc_tls_model_attr" = no; then
as_fn_error $? "support for the tls_model attribute is required" "$LINENO" 5
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option to disable generation of FMA instructions" >&5
+$as_echo_n "checking for compiler option to disable generation of FMA instructions... " >&6; }
+if ${libc_cv_cc_nofma+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ libc_cv_cc_nofma=
+for opt in -ffp-contract=off -mno-fused-madd; do
+ if { ac_try='${CC-cc} $opt -xc /dev/null -S -o /dev/null'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ libc_cv_cc_nofma=$opt; break
+fi
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_nofma" >&5
+$as_echo "$libc_cv_cc_nofma" >&6; }
+
if test -n "$submachine"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option for CPU variant" >&5
$as_echo_n "checking for compiler option for CPU variant... " >&6; }
@@ -7054,10 +7069,11 @@ else
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
+ test $ac_status = 0; }; }; then :
+
libc_cv_cc_submachine="$opt"
break
- fi
+fi
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_submachine" >&5
@@ -7662,6 +7678,7 @@ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fPIC is default" >&5
$as_echo_n "checking whether -fPIC is default... " >&6; }
if ${libc_cv_pic_default+:} false; then :
diff --git a/configure.in b/configure.in
index ee5e856306..2363015edb 100644
--- a/configure.in
+++ b/configure.in
@@ -1753,18 +1753,10 @@ fi
AC_SUBST(fno_unit_at_a_time)
AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl
-cat > conftest.c <<EOF
-int foo;
-main () { return 0;}
-EOF
-if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -Werror -fstack-protector
- -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
-then
- libc_cv_ssp=yes
-else
- libc_cv_ssp=no
-fi
-rm -f conftest*])
+LIBC_TRY_CC_OPTION([$CFLAGS $CPPFLAGS -Werror -fstack-protector],
+ [libc_cv_ssp=yes],
+ [libc_cv_ssp=no])
+])
AC_SUBST(libc_cv_ssp)
AC_CACHE_CHECK(for -fgnu89-inline, libc_cv_gnu89_inline, [dnl
@@ -2000,15 +1992,22 @@ if test "$libc_cv_gcc_tls_model_attr" = no; then
AC_MSG_ERROR([support for the tls_model attribute is required])
fi
+dnl Determine how to disable generation of FMA instructions.
+AC_CACHE_CHECK([for compiler option to disable generation of FMA instructions],
+ libc_cv_cc_nofma, [dnl
+libc_cv_cc_nofma=
+for opt in -ffp-contract=off -mno-fused-madd; do
+ LIBC_TRY_CC_OPTION([$opt], [libc_cv_cc_nofma=$opt; break])
+done])
+
if test -n "$submachine"; then
AC_CACHE_CHECK([for compiler option for CPU variant],
libc_cv_cc_submachine, [dnl
libc_cv_cc_submachine=no
for opt in "-march=$submachine" "-mcpu=$submachine"; do
- if AC_TRY_COMMAND([${CC-cc} $opt -xc /dev/null -S -o /dev/null]); then
+ LIBC_TRY_CC_OPTION([$opt], [
libc_cv_cc_submachine="$opt"
- break
- fi
+ break], [])
done])
if test "x$libc_cv_cc_submachine" = xno; then
AC_MSG_ERROR([${CC-cc} does not support $submachine])
@@ -2144,6 +2143,7 @@ AC_SUBST(libc_cv_cc_avx)
AC_SUBST(libc_cv_cc_sse2avx)
AC_SUBST(libc_cv_cc_novzeroupper)
AC_SUBST(libc_cv_cc_fma4)
+AC_SUBST(libc_cv_cc_nofma)
AC_SUBST(libc_cv_as_i686)
AC_SUBST(libc_cv_sparc_as_vis3)
diff --git a/conform/conformtest.pl b/conform/conformtest.pl
index 6a780203ce..83650c2454 100644
--- a/conform/conformtest.pl
+++ b/conform/conformtest.pl
@@ -3,11 +3,11 @@
use Getopt::Long;
use POSIX;
+$standard = "XOPEN2K8";
$CC = "gcc";
-
-$standard="XOPEN2K8";
+$tmpdir = "/tmp";
GetOptions ('headers=s' => \@headers, 'standard=s' => \$standard,
- 'flags=s' => \$flags, 'cc=s' => \$CC);
+ 'flags=s' => \$flags, 'cc=s' => \$CC, 'tmpdir=s' => \$tmpdir);
@headers = split(/,/,join(',',@headers));
# List of the headers we are testing.
@@ -84,11 +84,6 @@ while ($#knownproblems >= 0) {
$isknown{pop (@knownproblems)} = 1;
}
-$uid = getuid();
-($pwname,$pwpasswd,$pwuid,$pwgid,
- $pwquota,$pwcomment,$pwgcos,$pwdir,$pwshell,$pwexpire) = getpwuid($uid);
-$tmpdir = "$pwdir";
-
$verbose = 1;
$total = 0;
diff --git a/conform/run-conformtest.sh b/conform/run-conformtest.sh
index d83aa799d4..c82fbcb5a4 100644
--- a/conform/run-conformtest.sh
+++ b/conform/run-conformtest.sh
@@ -5,6 +5,9 @@ perl="$2"
cc="$3"
includes="$4"
+scratch=${objpfx}scratch
+mkdir -p "$scratch"
+
standards=("ISO" "ISO99" "ISO11" "POSIX" "XPG3" "XPG4" "UNIX98"
"XOPEN2K" "XOPEN2K8" "POSIX2008")
@@ -13,7 +16,7 @@ exitval=0
for s in ${standards[*]}; do
echo -n $s...
e=0
- if ! $perl conformtest.pl --cc="$cc" --flags="$includes" --standard=$s > ${objpfx}conform-$s.out; then
+ if ! $perl conformtest.pl --tmpdir="$scratch" --cc="$cc" --flags="$includes" --standard=$s > ${objpfx}conform-$s.out; then
e=1
fi
printf "\n%s\n" $s >> ${objpfx}run-conformtest.out
diff --git a/debug/backtracesyms.c b/debug/backtracesyms.c
index d75ce0a321..3fabf26a8b 100644
--- a/debug/backtracesyms.c
+++ b/debug/backtracesyms.c
@@ -1,5 +1,5 @@
/* Return list with names for address in backtrace.
- Copyright (C) 1998,1999,2000,2001,2003,2009 Free Software Foundation, Inc.
+ Copyright (C) 1998-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
diff --git a/debug/backtracesymsfd.c b/debug/backtracesymsfd.c
index 8b4a836ce9..297e32d6ba 100644
--- a/debug/backtracesymsfd.c
+++ b/debug/backtracesymsfd.c
@@ -1,5 +1,5 @@
/* Write formatted list with names for addresses in backtrace to a file.
- Copyright (C) 1998,2000,2003,2005,2009,2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -21,7 +21,7 @@
#include <string.h>
#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <ldsodefs.h>
#if __ELF_NATIVE_CLASS == 32
diff --git a/debug/segfault.c b/debug/segfault.c
index 18f811580b..98886dbf15 100644
--- a/debug/segfault.c
+++ b/debug/segfault.c
@@ -29,7 +29,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <ldsodefs.h>
#include <bp-checks.h>
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
index 2e6f88b326..0357dffc42 100644
--- a/elf/dl-cache.c
+++ b/elf/dl-cache.c
@@ -24,7 +24,7 @@
#include <dl-cache.h>
#include <dl-procinfo.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#ifndef _DL_PLATFORMS_COUNT
# define _DL_PLATFORMS_COUNT 0
diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c
index 3a984afb1c..316de99b8f 100644
--- a/elf/dl-minimal.c
+++ b/elf/dl-minimal.c
@@ -26,7 +26,7 @@
#include <sys/param.h>
#include <sys/types.h>
#include <ldsodefs.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <assert.h>
diff --git a/elf/dl-misc.c b/elf/dl-misc.c
index 9bf642daaa..22fbba38d4 100644
--- a/elf/dl-misc.c
+++ b/elf/dl-misc.c
@@ -30,7 +30,7 @@
#include <sys/stat.h>
#include <sys/uio.h>
#include <sysdep.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <bits/libc-lock.h>
/* Read the whole contents of FILE into new mmap'd space with given
diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c
index 0920cc155a..1cb4460a02 100644
--- a/elf/dl-sysdep.c
+++ b/elf/dl-sysdep.c
@@ -29,7 +29,7 @@
#include <sys/stat.h>
#include <sys/mman.h>
#include <ldsodefs.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <fpu_control.h>
#include <entry.h>
diff --git a/elf/dl-version.c b/elf/dl-version.c
index e314e02d07..af7f89960d 100644
--- a/elf/dl-version.c
+++ b/elf/dl-version.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
#include <ldsodefs.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <assert.h>
diff --git a/elf/rtld.c b/elf/rtld.c
index 3e15447f7a..1cc9cf3fe5 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -27,7 +27,7 @@
#include <sys/param.h>
#include <sys/stat.h>
#include <ldsodefs.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <entry.h>
#include <fpu_control.h>
#include <hp-timing.h>
diff --git a/elf/tst-auditmod1.c b/elf/tst-auditmod1.c
index 69da278f28..67fc758ac3 100644
--- a/elf/tst-auditmod1.c
+++ b/elf/tst-auditmod1.c
@@ -109,10 +109,17 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
# define La_retval La_i86_retval
# define int_retval lrv_eax
#elif defined __x86_64__
-# define pltenter la_x86_64_gnu_pltenter
-# define pltexit la_x86_64_gnu_pltexit
-# define La_regs La_x86_64_regs
-# define La_retval La_x86_64_retval
+# ifdef __LP64__
+# define pltenter la_x86_64_gnu_pltenter
+# define pltexit la_x86_64_gnu_pltexit
+# define La_regs La_x86_64_regs
+# define La_retval La_x86_64_retval
+# else
+# define pltenter la_x32_gnu_pltenter
+# define pltexit la_x32_gnu_pltexit
+# define La_regs La_x32_regs
+# define La_retval La_x32_retval
+# endif
# define int_retval lrv_rax
#elif defined __powerpc__ && __WORDSIZE == 32
# define pltenter la_ppc32_gnu_pltenter
@@ -188,7 +195,8 @@ pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
const char *symname)
{
printf ("pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
- symname, (long int) sym->st_value, ndx, outregs->int_retval);
+ symname, (long int) sym->st_value, ndx,
+ (ptrdiff_t) outregs->int_retval);
return 0;
}
diff --git a/elf/tst-auditmod3b.c b/elf/tst-auditmod3b.c
index 388ed6e49c..921eaca55a 100644
--- a/elf/tst-auditmod3b.c
+++ b/elf/tst-auditmod3b.c
@@ -105,10 +105,17 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
return sym->st_value;
}
-#define pltenter la_x86_64_gnu_pltenter
-#define pltexit la_x86_64_gnu_pltexit
-#define La_regs La_x86_64_regs
-#define La_retval La_x86_64_retval
+#ifdef __LP64__
+# define pltenter la_x86_64_gnu_pltenter
+# define pltexit la_x86_64_gnu_pltexit
+# define La_regs La_x86_64_regs
+# define La_retval La_x86_64_retval
+#else
+# define pltenter la_x32_gnu_pltenter
+# define pltexit la_x32_gnu_pltexit
+# define La_regs La_x32_regs
+# define La_retval La_x32_retval
+#endif
#define int_retval lrv_rax
#include <tst-audit.h>
@@ -140,7 +147,8 @@ pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
const char *symname)
{
printf ("pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
- symname, (long int) sym->st_value, ndx, outregs->int_retval);
+ symname, (long int) sym->st_value, ndx,
+ (ptrdiff_t) outregs->int_retval);
__m128i xmm = _mm_set1_epi32 (-1);
asm volatile ("movdqa %0, %%xmm0" : : "x" (xmm) : "xmm0" );
diff --git a/elf/tst-auditmod4b.c b/elf/tst-auditmod4b.c
index 761d97ce9d..75e85582bd 100644
--- a/elf/tst-auditmod4b.c
+++ b/elf/tst-auditmod4b.c
@@ -94,10 +94,17 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
return sym->st_value;
}
-#define pltenter la_x86_64_gnu_pltenter
-#define pltexit la_x86_64_gnu_pltexit
-#define La_regs La_x86_64_regs
-#define La_retval La_x86_64_retval
+#ifdef __LP64__
+# define pltenter la_x86_64_gnu_pltenter
+# define pltexit la_x86_64_gnu_pltexit
+# define La_regs La_x86_64_regs
+# define La_retval La_x86_64_retval
+#else
+# define pltenter la_x32_gnu_pltenter
+# define pltexit la_x32_gnu_pltexit
+# define La_regs La_x32_regs
+# define La_retval La_x32_retval
+#endif
#define int_retval lrv_rax
#include <tst-audit.h>
@@ -177,7 +184,8 @@ pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
const char *symname)
{
printf ("pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
- symname, (long int) sym->st_value, ndx, outregs->int_retval);
+ symname, (long int) sym->st_value, ndx,
+ (ptrdiff_t) outregs->int_retval);
#ifdef __AVX__
if (check_avx () && strcmp (symname, "audit_test") == 0)
diff --git a/elf/tst-auditmod5b.c b/elf/tst-auditmod5b.c
index 7e1e941126..d2443c8d20 100644
--- a/elf/tst-auditmod5b.c
+++ b/elf/tst-auditmod5b.c
@@ -95,10 +95,17 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
return sym->st_value;
}
-#define pltenter la_x86_64_gnu_pltenter
-#define pltexit la_x86_64_gnu_pltexit
-#define La_regs La_x86_64_regs
-#define La_retval La_x86_64_retval
+#ifdef __LP64__
+# define pltenter la_x86_64_gnu_pltenter
+# define pltexit la_x86_64_gnu_pltexit
+# define La_regs La_x86_64_regs
+# define La_retval La_x86_64_retval
+#else
+# define pltenter la_x32_gnu_pltenter
+# define pltexit la_x32_gnu_pltexit
+# define La_regs La_x32_regs
+# define La_retval La_x32_retval
+#endif
#define int_retval lrv_rax
#include <tst-audit.h>
@@ -150,7 +157,8 @@ pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
const char *symname)
{
printf ("pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
- symname, (long int) sym->st_value, ndx, outregs->int_retval);
+ symname, (long int) sym->st_value, ndx,
+ (ptrdiff_t) outregs->int_retval);
__m128i xmm;
diff --git a/elf/tst-auditmod6b.c b/elf/tst-auditmod6b.c
index a7a60b9927..b00dcd7c2e 100644
--- a/elf/tst-auditmod6b.c
+++ b/elf/tst-auditmod6b.c
@@ -94,10 +94,17 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
return sym->st_value;
}
-#define pltenter la_x86_64_gnu_pltenter
-#define pltexit la_x86_64_gnu_pltexit
-#define La_regs La_x86_64_regs
-#define La_retval La_x86_64_retval
+#ifdef __LP64__
+# define pltenter la_x86_64_gnu_pltenter
+# define pltexit la_x86_64_gnu_pltexit
+# define La_regs La_x86_64_regs
+# define La_retval La_x86_64_retval
+#else
+# define pltenter la_x32_gnu_pltenter
+# define pltexit la_x32_gnu_pltexit
+# define La_regs La_x32_regs
+# define La_retval La_x32_retval
+#endif
#define int_retval lrv_rax
#include <tst-audit.h>
@@ -179,7 +186,8 @@ pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
const char *symname)
{
printf ("pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
- symname, (long int) sym->st_value, ndx, outregs->int_retval);
+ symname, (long int) sym->st_value, ndx,
+ (ptrdiff_t) outregs->int_retval);
#ifdef __AVX__
if (check_avx () && strcmp (symname, "audit_test") == 0)
diff --git a/elf/tst-auditmod6c.c b/elf/tst-auditmod6c.c
index e0b5ac2319..a78c913963 100644
--- a/elf/tst-auditmod6c.c
+++ b/elf/tst-auditmod6c.c
@@ -94,10 +94,17 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
return sym->st_value;
}
-#define pltenter la_x86_64_gnu_pltenter
-#define pltexit la_x86_64_gnu_pltexit
-#define La_regs La_x86_64_regs
-#define La_retval La_x86_64_retval
+#ifdef __LP64__
+# define pltenter la_x86_64_gnu_pltenter
+# define pltexit la_x86_64_gnu_pltexit
+# define La_regs La_x86_64_regs
+# define La_retval La_x86_64_retval
+#else
+# define pltenter la_x32_gnu_pltenter
+# define pltexit la_x32_gnu_pltexit
+# define La_regs La_x32_regs
+# define La_retval La_x32_retval
+#endif
#define int_retval lrv_rax
#include <tst-audit.h>
@@ -185,7 +192,8 @@ pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
const char *symname)
{
printf ("pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
- symname, (long int) sym->st_value, ndx, outregs->int_retval);
+ symname, (long int) sym->st_value, ndx,
+ (ptrdiff_t) outregs->int_retval);
#ifdef __AVX__
if (check_avx () && strcmp (symname, "audit_test") == 0)
diff --git a/elf/tst-auditmod7b.c b/elf/tst-auditmod7b.c
index a27d38540e..d761149a2f 100644
--- a/elf/tst-auditmod7b.c
+++ b/elf/tst-auditmod7b.c
@@ -94,10 +94,17 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
return sym->st_value;
}
-#define pltenter la_x86_64_gnu_pltenter
-#define pltexit la_x86_64_gnu_pltexit
-#define La_regs La_x86_64_regs
-#define La_retval La_x86_64_retval
+#ifdef __LP64__
+# define pltenter la_x86_64_gnu_pltenter
+# define pltexit la_x86_64_gnu_pltexit
+# define La_regs La_x86_64_regs
+# define La_retval La_x86_64_retval
+#else
+# define pltenter la_x32_gnu_pltenter
+# define pltexit la_x32_gnu_pltexit
+# define La_regs La_x32_regs
+# define La_retval La_x32_retval
+#endif
#define int_retval lrv_rax
#include <tst-audit.h>
@@ -177,7 +184,8 @@ pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
const char *symname)
{
printf ("pltexit: symname=%s, st_value=%#lx, ndx=%u, retval=%tu\n",
- symname, (long int) sym->st_value, ndx, outregs->int_retval);
+ symname, (long int) sym->st_value, ndx,
+ (ptrdiff_t) outregs->int_retval);
#ifdef __AVX__
if (check_avx () && strcmp (symname, "audit_test") == 0)
diff --git a/grp/Makefile b/grp/Makefile
index b5c689effa..127310f0de 100644
--- a/grp/Makefile
+++ b/grp/Makefile
@@ -37,12 +37,6 @@ endif
include ../Rules
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
-endif
-
-
ifeq ($(have-thread-library),yes)
CFLAGS-getgrgid_r.c = -DUSE_NSCD=1 -fexceptions
diff --git a/hurd/hurdsock.c b/hurd/hurdsock.c
index 170a3f6185..f3611ecf27 100644
--- a/hurd/hurdsock.c
+++ b/hurd/hurdsock.c
@@ -22,7 +22,7 @@
#include <string.h>
#include <hurd/paths.h>
#include <stdio.h>
-#include "stdio-common/_itoa.h"
+#include <_itoa.h>
#include <cthreads.h> /* For `struct mutex'. */
#include "hurdmalloc.h" /* XXX */
diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c
index c65eb5ad57..3c506a043a 100644
--- a/hurd/lookup-retry.c
+++ b/hurd/lookup-retry.c
@@ -24,7 +24,7 @@
#include <limits.h>
#include <fcntl.h>
#include <string.h>
-#include "stdio-common/_itoa.h"
+#include <_itoa.h>
/* Translate the error from dir_lookup into the error the user sees. */
static inline error_t
diff --git a/include/link.h b/include/link.h
index c5265ee16f..2eb3179475 100644
--- a/include/link.h
+++ b/include/link.h
@@ -330,4 +330,9 @@ extern int __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
size_t size, void *data),
void *data);
+/* We use this macro to refer to ELF macros independent of the native
+ wordsize. `ELFW(R_TYPE)' is used in place of `ELF32_R_TYPE' or
+ `ELF64_R_TYPE'. */
+#define ELFW(type) _ElfW (ELF, __ELF_NATIVE_CLASS, type)
+
#endif /* include/link.h */
diff --git a/inet/Makefile b/inet/Makefile
index a7b8f2858d..80e2d7ab2e 100644
--- a/inet/Makefile
+++ b/inet/Makefile
@@ -91,8 +91,3 @@ endif
ifeq ($(build-static-nss),yes)
CFLAGS += -DSTATIC_NSS
endif
-
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
-endif
diff --git a/login/Makefile b/login/Makefile
index f28f007e6f..9b6d2bb78c 100644
--- a/login/Makefile
+++ b/login/Makefile
@@ -48,11 +48,6 @@ include ../Rules
CFLAGS-getpt.c = -fexceptions
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a $(common-objpfx)libc.a
-endif
-
ifeq (yesyes,$(have-fpie)$(build-shared))
pt_chown-cflags += $(pie-ccflag)
endif
diff --git a/malloc/malloc.c b/malloc/malloc.c
index d7d79e03fa..79cdc52330 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -218,7 +218,7 @@
#include <malloc-machine.h>
#include <atomic.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <bits/wordsize.h>
#include <sys/sysinfo.h>
diff --git a/malloc/mtrace.c b/malloc/mtrace.c
index 67e3e44336..e299a16239 100644
--- a/malloc/mtrace.c
+++ b/malloc/mtrace.c
@@ -31,7 +31,7 @@
#include <string.h>
#include <stdlib.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <libc-internal.h>
diff --git a/manual/creature.texi b/manual/creature.texi
index cc09e33896..1bf53147ee 100644
--- a/manual/creature.texi
+++ b/manual/creature.texi
@@ -1,6 +1,5 @@
@node Feature Test Macros
@subsection Feature Test Macros
-@include macros.texi
@cindex feature test macros
The exact set of features available when you compile a source file
diff --git a/manual/intro.texi b/manual/intro.texi
index 4a709edf72..deaf089b10 100644
--- a/manual/intro.texi
+++ b/manual/intro.texi
@@ -548,7 +548,6 @@ The header file @file{termios.h} reserves names prefixed with @samp{c_},
@end itemize
@comment Include the section on Creature Nest Macros.
-@comment It is in a separate file so it can be formatted into ../NOTES.
@include creature.texi
@node Roadmap to the Manual, , Using the Library, Introduction
diff --git a/manual/lang.texi b/manual/lang.texi
index 6cb7371aab..baaccaa30f 100644
--- a/manual/lang.texi
+++ b/manual/lang.texi
@@ -229,7 +229,6 @@ additional variable arguments. @xref{Calling Variadics}.
variable arguments functions.
* Argument Macros:: Detailed specification of the macros
for accessing variable arguments.
-* Old Varargs:: The pre-ISO way of defining variadic functions.
@end menu
@node Variadic Prototypes
@@ -427,9 +426,6 @@ The type @code{va_list} is used for argument pointer variables.
This macro initializes the argument pointer variable @var{ap} to point
to the first of the optional arguments of the current function;
@var{last-required} must be the last required argument to the function.
-
-@xref{Old Varargs}, for an alternate definition of @code{va_start}
-found in the header file @file{varargs.h}.
@end deftypefn
@comment stdarg.h
@@ -511,68 +507,6 @@ arguments facility.
@include add.c.texi
@end smallexample
-@node Old Varargs
-@subsubsection Old-Style Variadic Functions
-
-@pindex varargs.h
-Before @w{ISO C}, programmers used a slightly different facility for
-writing variadic functions. The GNU C compiler still supports it;
-currently, it is more portable than the @w{ISO C} facility, since support
-for @w{ISO C} is still not universal. The header file which defines the
-old-fashioned variadic facility is called @file{varargs.h}.
-
-Using @file{varargs.h} is almost the same as using @file{stdarg.h}.
-There is no difference in how you call a variadic function;
-see @ref{Calling Variadics}. The only difference is in how you define
-them. First of all, you must use old-style non-prototype syntax, like
-this:
-
-@smallexample
-tree
-build (va_alist)
- va_dcl
-@{
-@end smallexample
-
-Secondly, you must give @code{va_start} only one argument, like this:
-
-@smallexample
- va_list p;
- va_start (p);
-@end smallexample
-
-These are the special macros used for defining old-style variadic
-functions:
-
-@comment varargs.h
-@comment Unix
-@deffn Macro va_alist
-This macro stands for the argument name list required in a variadic
-function.
-@end deffn
-
-@comment varargs.h
-@comment Unix
-@deffn Macro va_dcl
-This macro declares the implicit argument or arguments for a variadic
-function.
-@end deffn
-
-@comment varargs.h
-@comment Unix
-@deftypefn {Macro} void va_start (va_list @var{ap})
-This macro, as defined in @file{varargs.h}, initializes the argument
-pointer variable @var{ap} to point to the first argument of the current
-function.
-@end deftypefn
-
-The other argument macros, @code{va_arg} and @code{va_end}, are the same
-in @file{varargs.h} as in @file{stdarg.h}; see @ref{Argument Macros}, for
-details.
-
-It does not work to include both @file{varargs.h} and @file{stdarg.h} in
-the same compilation; they define @code{va_start} in conflicting ways.
-
@node Null Pointer Constant
@section Null Pointer Constant
@cindex null pointer constant
diff --git a/math/e_exp2l.c b/math/e_exp2l.c
index e7e493933a..8904d3e4a0 100644
--- a/math/e_exp2l.c
+++ b/math/e_exp2l.c
@@ -1,11 +1,49 @@
+/* Compute 2^x.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
#include <math.h>
#include <math_private.h>
+#include <float.h>
long double
__ieee754_exp2l (long double x)
{
- /* This is a very stupid and inprecise implementation. It'll get
- replaced sometime (soon?). */
- return __ieee754_expl (M_LN2l * x);
+ if (__builtin_expect (isless (x, (long double) LDBL_MAX_EXP), 1))
+ {
+ if (__builtin_expect (isgreaterequal (x, (long double) (LDBL_MIN_EXP
+ - LDBL_MANT_DIG
+ - 1)), 1))
+ {
+ int intx = (int) x;
+ long double fractx = x - intx;
+ return __scalbnl (__ieee754_expl (M_LN2l * fractx), intx);
+ }
+ else
+ {
+ /* Underflow or exact zero. */
+ if (__isinfl (x))
+ return 0;
+ else
+ return LDBL_MIN * LDBL_MIN;
+ }
+ }
+ else
+ /* Infinity, NaN or overflow. */
+ return LDBL_MAX * x;
}
strong_alias (__ieee754_exp2l, __exp2l_finite)
diff --git a/math/gen-libm-test.pl b/math/gen-libm-test.pl
index 579fbe5a9e..395bb65513 100755
--- a/math/gen-libm-test.pl
+++ b/math/gen-libm-test.pl
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# Copyright (C) 1999, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Andreas Jaeger <aj@suse.de>, 1999.
@@ -78,8 +78,10 @@ use vars qw ($output_dir $ulps_file);
"M_SQRT_PIl" => "sqrt (pi)",
"INVALID_EXCEPTION" => "invalid exception",
"DIVIDE_BY_ZERO_EXCEPTION" => "division by zero exception",
+ "OVERFLOW_EXCEPTION" => "overflow exception",
"INVALID_EXCEPTION_OK" => "invalid exception allowed",
"DIVIDE_BY_ZERO_EXCEPTION_OK" => "division by zero exception allowed",
+ "OVERFLOW_EXCEPTION_OK" => "overflow exception allowed",
"EXCEPTIONS_OK" => "exceptions allowed",
"IGNORE_ZERO_INF_SIGN" => "sign of zero/inf not specified",
"INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN" => "invalid exception and sign of zero/inf not specified"
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 8bb435875d..3851855fec 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -78,8 +78,8 @@
against. These implemented tests should check all cases that are
specified in ISO C99.
- Exception testing: At the moment only divide-by-zero and invalid
- exceptions are tested. Overflow/underflow and inexact exceptions
+ Exception testing: At the moment only divide-by-zero, invalid and
+ overflow exceptions are tested. Underflow and inexact exceptions
aren't checked at the moment.
NaN values: There exist signalling and quiet NaNs. This implementation
@@ -132,12 +132,14 @@
#define NO_EXCEPTION 0x0
#define INVALID_EXCEPTION 0x1
#define DIVIDE_BY_ZERO_EXCEPTION 0x2
+#define OVERFLOW_EXCEPTION 0x4
/* The next flags signals that those exceptions are allowed but not required. */
-#define INVALID_EXCEPTION_OK 0x4
-#define DIVIDE_BY_ZERO_EXCEPTION_OK 0x8
+#define INVALID_EXCEPTION_OK 0x8
+#define DIVIDE_BY_ZERO_EXCEPTION_OK 0x10
+#define OVERFLOW_EXCEPTION_OK 0x20
#define EXCEPTIONS_OK INVALID_EXCEPTION_OK+DIVIDE_BY_ZERO_EXCEPTION_OK
/* Some special test flags, passed togther with exceptions. */
-#define IGNORE_ZERO_INF_SIGN 0x10
+#define IGNORE_ZERO_INF_SIGN 0x40
/* Various constants (we must supply them precalculated for accuracy). */
#define M_PI_6l .52359877559829887307710723054658383L
@@ -451,6 +453,11 @@ test_exceptions (const char *test_name, int exception)
test_single_exception (test_name, exception, INVALID_EXCEPTION, FE_INVALID,
"Invalid operation");
#endif
+#ifdef FE_OVERFLOW
+ if ((exception & OVERFLOW_EXCEPTION_OK) == 0)
+ test_single_exception (test_name, exception, OVERFLOW_EXCEPTION,
+ FE_OVERFLOW, "Overflow");
+#endif
feclearexcept (FE_ALL_EXCEPT);
}
@@ -1887,6 +1894,50 @@ cexp_test (void)
TEST_c_c (cexp, 0.75L, 1.25L, 0.667537446429131586942201977015932112L, 2.00900045494094876258347228145863909L);
TEST_c_c (cexp, -2.0, -3.0, -0.13398091492954261346140525546115575L, -0.019098516261135196432576240858800925L);
+ TEST_c_c (cexp, 0, 0x1p65, 0.99888622066058013610642172179340364209972L, -0.047183876212354673805106149805700013943218L);
+ TEST_c_c (cexp, 0, -0x1p65, 0.99888622066058013610642172179340364209972L, 0.047183876212354673805106149805700013943218L);
+ TEST_c_c (cexp, 50, 0x1p127, 4.053997150228616856622417636046265337193e21L, 3.232070315463388524466674772633810238819e21L);
+
+#ifndef TEST_FLOAT
+ TEST_c_c (cexp, 0, 1e22, 0.5232147853951389454975944733847094921409L, -0.8522008497671888017727058937530293682618L);
+ TEST_c_c (cexp, 0, 0x1p1023, -0.826369834614147994500785680811743734805L, 0.5631277798508840134529434079444683477104L);
+ TEST_c_c (cexp, 500, 0x1p1023, -1.159886268932754433233243794561351783426e217L, 7.904017694554466595359379965081774849708e216L);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+ TEST_c_c (cexp, 0, 0x1p16383L, 0.9210843909921906206874509522505756251609L, 0.3893629985894208126948115852610595405563L);
+ TEST_c_c (cexp, -10000, 0x1p16383L, 1.045876464564882298442774542991176546722e-4343L, 4.421154026488516836023811173959413420548e-4344L);
+#endif
+
+ TEST_c_c (cexp, 88.75, 0.75, 2.558360358486542817001900410314204322891e38L, 2.383359453227311447654736314679677655100e38L);
+ TEST_c_c (cexp, -95, 0.75, 4.039714446238306526889476684000081624047e-42L, 3.763383677300535390271646960780570275931e-42L);
+
+#ifndef TEST_FLOAT
+ TEST_c_c (cexp, 709.8125, 0.75, 1.355121963080879535248452862759108365762e308L, 1.262426823598609432507811340856186873507e308L);
+ TEST_c_c (cexp, -720, 0.75, 1.486960657116368433685753325516638551722e-313L, 1.385247284245720590980701226843815229385e-313L);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+ TEST_c_c (cexp, 11356.5625, 0.75, 9.052188470850960144814815984311663764287e4931L, 8.432986734191301036267148978260970230200e4931L);
+ TEST_c_c (cexp, -11370, 0.75, 8.631121063182211587489310508568170739592e-4939L, 8.040721827809267291427062346918413482824e-4939L);
+#endif
+
+#ifdef TEST_FLOAT
+ TEST_c_c (cexp, 180, 0x1p-149, plus_infty, 2.087071793345235105931967606907855310664e33L, OVERFLOW_EXCEPTION);
+#endif
+
+#if defined TEST_DOUBLE || (defined TEST_LDOUBLE && LDBL_MAX_EXP == 1024)
+ TEST_c_c (cexp, 1440, 0x1p-1074, plus_infty, 1.196295853897226111293303155636183216483e302L, OVERFLOW_EXCEPTION);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+ TEST_c_c (cexp, 22730, 0x1p-16434L, plus_infty, 2.435706297811211974162115164702304105374e4924L, OVERFLOW_EXCEPTION);
+#endif
+
+ TEST_c_c (cexp, 1e6, 0, plus_infty, 0, OVERFLOW_EXCEPTION);
+ TEST_c_c (cexp, 1e6, min_value, plus_infty, plus_infty, OVERFLOW_EXCEPTION);
+ TEST_c_c (cexp, 1e6, -min_value, plus_infty, minus_infty, OVERFLOW_EXCEPTION);
+
END (cexp, complex);
}
@@ -3074,7 +3125,7 @@ exp10_test (void)
TEST_f_f (exp10, nan_value, nan_value);
TEST_f_f (exp10, 3, 1000);
TEST_f_f (exp10, -1, 0.1L);
- TEST_f_f (exp10, 1e6, plus_infty);
+ TEST_f_f (exp10, 1e6, plus_infty, OVERFLOW_EXCEPTION);
TEST_f_f (exp10, -1e6, 0);
TEST_f_f (exp10, 0.75L, 5.62341325190349080394951039776481231L);
@@ -3101,10 +3152,25 @@ exp2_test (void)
TEST_f_f (exp2, 10, 1024);
TEST_f_f (exp2, -1, 0.5);
- TEST_f_f (exp2, 1e6, plus_infty);
+ TEST_f_f (exp2, 1e6, plus_infty, OVERFLOW_EXCEPTION);
TEST_f_f (exp2, -1e6, 0);
TEST_f_f (exp2, 0.75L, 1.68179283050742908606225095246642979L);
+ TEST_f_f (exp2, 100.5, 1.792728671193156477399422023278661496394e+30L);
+ TEST_f_f (exp2, 127, 0x1p127);
+ TEST_f_f (exp2, -149, 0x1p-149);
+
+#ifndef TEST_FLOAT
+ TEST_f_f (exp2, 1000.25, 1.274245659452564874772384918171765416737e+301L);
+ TEST_f_f (exp2, 1023, 0x1p1023);
+ TEST_f_f (exp2, -1074, 0x1p-1074);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+ TEST_f_f (exp2, 16383, 0x1p16383L);
+ TEST_f_f (exp2, -16400, 0x1p-16400L);
+#endif
+
END (exp2);
}
@@ -3137,7 +3203,8 @@ expm1_test (void)
#endif
errno = 0;
- TEST_f_f (expm1, 100000.0, plus_infty);
+ /* Bug 13787: OVERFLOW exception may be missing. */
+ TEST_f_f (expm1, 100000.0, plus_infty, OVERFLOW_EXCEPTION_OK);
check_int ("errno for expm1(large) == ERANGE", errno, ERANGE, 0, 0, 0);
END (expm1);
@@ -5242,8 +5309,8 @@ nextafter_test (void)
FLOAT fltmax = CHOOSE (LDBL_MAX, DBL_MAX, FLT_MAX,
LDBL_MAX, DBL_MAX, FLT_MAX);
- TEST_ff_f (nextafter, fltmax, plus_infty, plus_infty);
- TEST_ff_f (nextafter, -fltmax, minus_infty, minus_infty);
+ TEST_ff_f (nextafter, fltmax, plus_infty, plus_infty, OVERFLOW_EXCEPTION);
+ TEST_ff_f (nextafter, -fltmax, minus_infty, minus_infty, OVERFLOW_EXCEPTION);
#ifdef TEST_LDOUBLE
// XXX Enable once gcc is fixed.
@@ -5422,11 +5489,75 @@ pow_test (void)
TEST_ff_f (pow, 0, -11, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
check_int ("errno for pow(0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
errno = 0;
+ TEST_ff_f (pow, 0, -0xffffff, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+#ifndef TEST_FLOAT
+ errno = 0;
+ TEST_ff_f (pow, 0, -0x1.fffffffffffffp+52L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+ errno = 0;
+ TEST_ff_f (pow, 0, -0x1.fffffffffffffffep+63L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+# endif
+# if LDBL_MANT_DIG >= 106
+ errno = 0;
+ TEST_ff_f (pow, 0, -0x1.ffffffffffffffffffffffffff8p+105L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+# endif
+# if LDBL_MANT_DIG >= 113
+ errno = 0;
+ TEST_ff_f (pow, 0, -0x1.ffffffffffffffffffffffffffffp+112L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+# endif
+#endif
TEST_ff_f (pow, minus_zero, -1, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
check_int ("errno for pow(-0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
errno = 0;
TEST_ff_f (pow, minus_zero, -11L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
check_int ("errno for pow(-0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+ errno = 0;
+ TEST_ff_f (pow, minus_zero, -0xffffff, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(-0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+ errno = 0;
+ TEST_ff_f (pow, minus_zero, -0x1fffffe, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(-0,-even) == ERANGE", errno, ERANGE, 0, 0, 0);
+#ifndef TEST_FLOAT
+ errno = 0;
+ TEST_ff_f (pow, minus_zero, -0x1.fffffffffffffp+52L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(-0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+ errno = 0;
+ TEST_ff_f (pow, minus_zero, -0x1.fffffffffffffp+53L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(-0,-even) == ERANGE", errno, ERANGE, 0, 0, 0);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+ errno = 0;
+ TEST_ff_f (pow, minus_zero, -0x1.fffffffffffffffep+63L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(-0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+ errno = 0;
+ TEST_ff_f (pow, minus_zero, -0x1.fffffffffffffffep+64L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(-0,-even) == ERANGE", errno, ERANGE, 0, 0, 0);
+# endif
+# if LDBL_MANT_DIG >= 106
+ errno = 0;
+ TEST_ff_f (pow, minus_zero, -0x1.ffffffffffffffffffffffffff8p+105L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(-0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+ errno = 0;
+ TEST_ff_f (pow, minus_zero, -0x1.ffffffffffffffffffffffffff8p+106L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(-0,-even) == ERANGE", errno, ERANGE, 0, 0, 0);
+# endif
+# if LDBL_MANT_DIG >= 113
+ errno = 0;
+ TEST_ff_f (pow, minus_zero, -0x1.ffffffffffffffffffffffffffffp+112L, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(-0,-odd) == ERANGE", errno, ERANGE, 0, 0, 0);
+ errno = 0;
+ TEST_ff_f (pow, minus_zero, -0x1.ffffffffffffffffffffffffffffp+113L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(-0,-even) == ERANGE", errno, ERANGE, 0, 0, 0);
+# endif
+#endif
errno = 0;
TEST_ff_f (pow, 0, -2, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
@@ -5435,16 +5566,38 @@ pow_test (void)
TEST_ff_f (pow, 0, -11.1L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
check_int ("errno for pow(0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
errno = 0;
+ TEST_ff_f (pow, 0, -0x1p24, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
+ errno = 0;
+ TEST_ff_f (pow, 0, -0x1p127, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
+ errno = 0;
+ /* Bug 13879: spurious OVERFLOW exception may be present. */
+ TEST_ff_f (pow, 0, -max_value, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|OVERFLOW_EXCEPTION_OK);
+ check_int ("errno for pow(0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
+ errno = 0;
TEST_ff_f (pow, minus_zero, -2, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
check_int ("errno for pow(-0,-even) == ERANGE", errno, ERANGE, 0, 0, 0);
errno = 0;
TEST_ff_f (pow, minus_zero, -11.1L, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
check_int ("errno for pow(-0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
+ errno = 0;
+ TEST_ff_f (pow, minus_zero, -0x1p24, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(-0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
+ errno = 0;
+ TEST_ff_f (pow, minus_zero, -0x1p127, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("errno for pow(-0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
+ errno = 0;
+ /* Bug 13879: spurious OVERFLOW exception may be present. */
+ TEST_ff_f (pow, minus_zero, -max_value, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|OVERFLOW_EXCEPTION_OK);
+ check_int ("errno for pow(-0,-num) == ERANGE", errno, ERANGE, 0, 0, 0);
- TEST_ff_f (pow, 0x1p72L, 0x1p72L, plus_infty);
+ TEST_ff_f (pow, 0x1p72L, 0x1p72L, plus_infty, OVERFLOW_EXCEPTION);
TEST_ff_f (pow, 10, -0x1p72L, 0);
- TEST_ff_f (pow, max_value, max_value, plus_infty);
- TEST_ff_f (pow, 10, -max_value, 0);
+ /* Bug 13873: OVERFLOW exception may be missing. */
+ TEST_ff_f (pow, max_value, max_value, plus_infty, OVERFLOW_EXCEPTION_OK);
+ /* Bug 13872: spurious OVERFLOW exception may be present. */
+ TEST_ff_f (pow, 10, -max_value, 0, OVERFLOW_EXCEPTION_OK);
TEST_ff_f (pow, 0, 1, 0);
TEST_ff_f (pow, 0, 11, 0);
@@ -5476,32 +5629,155 @@ pow_test (void)
/* pow (+inf, y) == +inf for y > 0. */
TEST_ff_f (pow, plus_infty, 2, plus_infty);
+ TEST_ff_f (pow, plus_infty, 0xffffff, plus_infty);
+#ifndef TEST_FLOAT
+ TEST_ff_f (pow, plus_infty, 0x1.fffffffffffffp+52L, plus_infty);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+ TEST_ff_f (pow, plus_infty, 0x1.fffffffffffffffep+63L, plus_infty);
+# endif
+# if LDBL_MANT_DIG >= 106
+ TEST_ff_f (pow, plus_infty, 0x1.ffffffffffffffffffffffffff8p+105L, plus_infty);
+# endif
+# if LDBL_MANT_DIG >= 113
+ TEST_ff_f (pow, plus_infty, 0x1.ffffffffffffffffffffffffffffp+112L, plus_infty);
+# endif
+#endif
+ TEST_ff_f (pow, plus_infty, 0x1p24, plus_infty);
+ TEST_ff_f (pow, plus_infty, 0x1p127, plus_infty);
+ TEST_ff_f (pow, plus_infty, max_value, plus_infty);
/* pow (+inf, y) == +0 for y < 0. */
TEST_ff_f (pow, plus_infty, -1, 0.0);
+ TEST_ff_f (pow, plus_infty, -0xffffff, 0.0);
+#ifndef TEST_FLOAT
+ TEST_ff_f (pow, plus_infty, -0x1.fffffffffffffp+52L, 0.0);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+ TEST_ff_f (pow, plus_infty, -0x1.fffffffffffffffep+63L, 0.0);
+# endif
+# if LDBL_MANT_DIG >= 106
+ TEST_ff_f (pow, plus_infty, -0x1.ffffffffffffffffffffffffff8p+105L, 0.0);
+# endif
+# if LDBL_MANT_DIG >= 113
+ TEST_ff_f (pow, plus_infty, -0x1.ffffffffffffffffffffffffffffp+112L, 0.0);
+# endif
+#endif
+ TEST_ff_f (pow, plus_infty, -0x1p24, 0.0);
+ TEST_ff_f (pow, plus_infty, -0x1p127, 0.0);
+ TEST_ff_f (pow, plus_infty, -max_value, 0.0);
/* pow (-inf, y) == -inf for y an odd integer > 0. */
TEST_ff_f (pow, minus_infty, 27, minus_infty);
+ TEST_ff_f (pow, minus_infty, 0xffffff, minus_infty);
+ TEST_ff_f (pow, minus_infty, 0x1fffffe, plus_infty);
+#ifndef TEST_FLOAT
+ TEST_ff_f (pow, minus_infty, 0x1.fffffffffffffp+52L, minus_infty);
+ TEST_ff_f (pow, minus_infty, 0x1.fffffffffffffp+53L, plus_infty);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+ TEST_ff_f (pow, minus_infty, 0x1.fffffffffffffffep+63L, minus_infty);
+ TEST_ff_f (pow, minus_infty, 0x1.fffffffffffffffep+64L, plus_infty);
+# endif
+# if LDBL_MANT_DIG >= 106
+ TEST_ff_f (pow, minus_infty, 0x1.ffffffffffffffffffffffffff8p+105L, minus_infty);
+ TEST_ff_f (pow, minus_infty, 0x1.ffffffffffffffffffffffffff8p+106L, plus_infty);
+# endif
+# if LDBL_MANT_DIG >= 113
+ TEST_ff_f (pow, minus_infty, 0x1.ffffffffffffffffffffffffffffp+112L, minus_infty);
+ TEST_ff_f (pow, minus_infty, 0x1.ffffffffffffffffffffffffffffp+113L, plus_infty);
+# endif
+#endif
/* pow (-inf, y) == +inf for y > 0 and not an odd integer. */
TEST_ff_f (pow, minus_infty, 28, plus_infty);
+ TEST_ff_f (pow, minus_infty, 0x1p24, plus_infty);
+ TEST_ff_f (pow, minus_infty, 0x1p127, plus_infty);
+ TEST_ff_f (pow, minus_infty, max_value, plus_infty);
/* pow (-inf, y) == -0 for y an odd integer < 0. */
TEST_ff_f (pow, minus_infty, -3, minus_zero);
+ TEST_ff_f (pow, minus_infty, -0xffffff, minus_zero);
+ TEST_ff_f (pow, minus_infty, -0x1fffffe, plus_zero);
+#ifndef TEST_FLOAT
+ TEST_ff_f (pow, minus_infty, -0x1.fffffffffffffp+52L, minus_zero);
+ TEST_ff_f (pow, minus_infty, -0x1.fffffffffffffp+53L, plus_zero);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+ TEST_ff_f (pow, minus_infty, -0x1.fffffffffffffffep+63L, minus_zero);
+ TEST_ff_f (pow, minus_infty, -0x1.fffffffffffffffep+64L, plus_zero);
+# endif
+# if LDBL_MANT_DIG >= 106
+ TEST_ff_f (pow, minus_infty, -0x1.ffffffffffffffffffffffffff8p+105L, minus_zero);
+ TEST_ff_f (pow, minus_infty, -0x1.ffffffffffffffffffffffffff8p+106L, plus_zero);
+# endif
+# if LDBL_MANT_DIG >= 113
+ TEST_ff_f (pow, minus_infty, -0x1.ffffffffffffffffffffffffffffp+112L, minus_zero);
+ TEST_ff_f (pow, minus_infty, -0x1.ffffffffffffffffffffffffffffp+113L, plus_zero);
+# endif
+#endif
/* pow (-inf, y) == +0 for y < 0 and not an odd integer. */
TEST_ff_f (pow, minus_infty, -2.0, 0.0);
+ TEST_ff_f (pow, minus_infty, -0x1p24, 0.0);
+ TEST_ff_f (pow, minus_infty, -0x1p127, 0.0);
+ TEST_ff_f (pow, minus_infty, -max_value, 0.0);
/* pow (+0, y) == +0 for y an odd integer > 0. */
TEST_ff_f (pow, 0.0, 27, 0.0);
+ TEST_ff_f (pow, 0.0, 0xffffff, 0.0);
+#ifndef TEST_FLOAT
+ TEST_ff_f (pow, 0.0, 0x1.fffffffffffffp+52L, 0.0);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+ TEST_ff_f (pow, 0.0, 0x1.fffffffffffffffep+63L, 0.0);
+# endif
+# if LDBL_MANT_DIG >= 106
+ TEST_ff_f (pow, 0.0, 0x1.ffffffffffffffffffffffffff8p+105L, 0.0);
+# endif
+# if LDBL_MANT_DIG >= 113
+ TEST_ff_f (pow, 0.0, 0x1.ffffffffffffffffffffffffffffp+112L, 0.0);
+# endif
+#endif
/* pow (-0, y) == -0 for y an odd integer > 0. */
TEST_ff_f (pow, minus_zero, 27, minus_zero);
+ TEST_ff_f (pow, minus_zero, 0xffffff, minus_zero);
+ TEST_ff_f (pow, minus_zero, 0x1fffffe, plus_zero);
+#ifndef TEST_FLOAT
+ TEST_ff_f (pow, minus_zero, 0x1.fffffffffffffp+52L, minus_zero);
+ TEST_ff_f (pow, minus_zero, 0x1.fffffffffffffp+53L, plus_zero);
+#endif
+#ifdef TEST_LDOUBLE
+# if LDBL_MANT_DIG >= 64
+ TEST_ff_f (pow, minus_zero, 0x1.fffffffffffffffep+63L, minus_zero);
+ TEST_ff_f (pow, minus_zero, 0x1.fffffffffffffffep+64L, plus_zero);
+# endif
+# if LDBL_MANT_DIG >= 106
+ TEST_ff_f (pow, minus_zero, 0x1.ffffffffffffffffffffffffff8p+105L, minus_zero);
+ TEST_ff_f (pow, minus_zero, 0x1.ffffffffffffffffffffffffff8p+106L, plus_zero);
+# endif
+# if LDBL_MANT_DIG >= 113
+ TEST_ff_f (pow, minus_zero, 0x1.ffffffffffffffffffffffffffffp+112L, minus_zero);
+ TEST_ff_f (pow, minus_zero, 0x1.ffffffffffffffffffffffffffffp+113L, plus_zero);
+# endif
+#endif
/* pow (+0, y) == +0 for y > 0 and not an odd integer. */
TEST_ff_f (pow, 0.0, 4, 0.0);
+ TEST_ff_f (pow, 0.0, 0x1p24, 0.0);
+ TEST_ff_f (pow, 0.0, 0x1p127, 0.0);
+ TEST_ff_f (pow, 0.0, max_value, 0.0);
/* pow (-0, y) == +0 for y > 0 and not an odd integer. */
TEST_ff_f (pow, minus_zero, 4, 0.0);
+ TEST_ff_f (pow, minus_zero, 0x1p24, 0.0);
+ TEST_ff_f (pow, minus_zero, 0x1p127, 0.0);
+ TEST_ff_f (pow, minus_zero, max_value, 0.0);
TEST_ff_f (pow, 16, 0.25L, 2);
TEST_ff_f (pow, 0x1p64L, 0.125L, 256);
@@ -6338,13 +6614,13 @@ scalbn_test (void)
TEST_fi_f (scalbn, 1, 0L, 1);
- TEST_fi_f (scalbn, 1, INT_MAX, plus_infty);
+ TEST_fi_f (scalbn, 1, INT_MAX, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbn, 1, INT_MIN, plus_zero);
- TEST_fi_f (scalbn, max_value, INT_MAX, plus_infty);
+ TEST_fi_f (scalbn, max_value, INT_MAX, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbn, max_value, INT_MIN, plus_zero);
- TEST_fi_f (scalbn, min_value, INT_MAX, plus_infty);
+ TEST_fi_f (scalbn, min_value, INT_MAX, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbn, min_value, INT_MIN, plus_zero);
- TEST_fi_f (scalbn, min_value / 4, INT_MAX, plus_infty);
+ TEST_fi_f (scalbn, min_value / 4, INT_MAX, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbn, min_value / 4, INT_MIN, plus_zero);
END (scalbn);
@@ -6369,32 +6645,32 @@ scalbln_test (void)
TEST_fl_f (scalbln, 1, 0L, 1);
- TEST_fi_f (scalbln, 1, INT_MAX, plus_infty);
+ TEST_fi_f (scalbln, 1, INT_MAX, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbln, 1, INT_MIN, plus_zero);
- TEST_fi_f (scalbln, max_value, INT_MAX, plus_infty);
+ TEST_fi_f (scalbln, max_value, INT_MAX, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbln, max_value, INT_MIN, plus_zero);
- TEST_fi_f (scalbln, min_value, INT_MAX, plus_infty);
+ TEST_fi_f (scalbln, min_value, INT_MAX, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbln, min_value, INT_MIN, plus_zero);
- TEST_fi_f (scalbln, min_value / 4, INT_MAX, plus_infty);
+ TEST_fi_f (scalbln, min_value / 4, INT_MAX, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbln, min_value / 4, INT_MIN, plus_zero);
- TEST_fi_f (scalbln, 1, LONG_MAX, plus_infty);
+ TEST_fi_f (scalbln, 1, LONG_MAX, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbln, 1, LONG_MIN, plus_zero);
- TEST_fi_f (scalbln, max_value, LONG_MAX, plus_infty);
+ TEST_fi_f (scalbln, max_value, LONG_MAX, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbln, max_value, LONG_MIN, plus_zero);
- TEST_fi_f (scalbln, min_value, LONG_MAX, plus_infty);
+ TEST_fi_f (scalbln, min_value, LONG_MAX, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbln, min_value, LONG_MIN, plus_zero);
- TEST_fi_f (scalbln, min_value / 4, LONG_MAX, plus_infty);
+ TEST_fi_f (scalbln, min_value / 4, LONG_MAX, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbln, min_value / 4, LONG_MIN, plus_zero);
#if LONG_MAX >= 0x100000000
- TEST_fi_f (scalbln, 1, 0x88000000L, plus_infty);
+ TEST_fi_f (scalbln, 1, 0x88000000L, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbln, 1, -0x88000000L, plus_zero);
- TEST_fi_f (scalbln, max_value, 0x88000000L, plus_infty);
+ TEST_fi_f (scalbln, max_value, 0x88000000L, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbln, max_value, -0x88000000L, plus_zero);
- TEST_fi_f (scalbln, min_value, 0x88000000L, plus_infty);
+ TEST_fi_f (scalbln, min_value, 0x88000000L, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbln, min_value, -0x88000000L, plus_zero);
- TEST_fi_f (scalbln, min_value / 4, 0x88000000L, plus_infty);
+ TEST_fi_f (scalbln, min_value / 4, 0x88000000L, plus_infty, OVERFLOW_EXCEPTION);
TEST_fi_f (scalbln, min_value / 4, -0x88000000L, plus_zero);
#endif
diff --git a/math/s_cexp.c b/math/s_cexp.c
index 82fe8148f7..1d7a5a2c40 100644
--- a/math/s_cexp.c
+++ b/math/s_cexp.c
@@ -1,5 +1,5 @@
/* Return value of complex exponential function for double complex value.
- Copyright (C) 1997, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,7 +21,7 @@
#include <fenv.h>
#include <math.h>
#include <math_private.h>
-
+#include <float.h>
__complex__ double
__cexp (__complex__ double x)
@@ -36,20 +36,35 @@ __cexp (__complex__ double x)
if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
- double exp_val = __ieee754_exp (__real__ x);
+ const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2);
double sinix, cosix;
__sincos (__imag__ x, &sinix, &cosix);
- if (isfinite (exp_val))
+ if (__real__ x > t)
{
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
+ double exp_t = __ieee754_exp (t);
+ __real__ x -= t;
+ sinix *= exp_t;
+ cosix *= exp_t;
+ if (__real__ x > t)
+ {
+ __real__ x -= t;
+ sinix *= exp_t;
+ cosix *= exp_t;
+ }
+ }
+ if (__real__ x > t)
+ {
+ /* Overflow (original real part of x > 3t). */
+ __real__ retval = DBL_MAX * cosix;
+ __imag__ retval = DBL_MAX * sinix;
}
else
{
- __real__ retval = __copysign (exp_val, cosix);
- __imag__ retval = __copysign (exp_val, sinix);
+ double exp_val = __ieee754_exp (__real__ x);
+ __real__ retval = exp_val * cosix;
+ __imag__ retval = exp_val * sinix;
}
}
else
diff --git a/math/s_cexpf.c b/math/s_cexpf.c
index a9c28ed8c2..4aa9765818 100644
--- a/math/s_cexpf.c
+++ b/math/s_cexpf.c
@@ -1,5 +1,5 @@
/* Return value of complex exponential function for float complex value.
- Copyright (C) 1997, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,7 +21,7 @@
#include <fenv.h>
#include <math.h>
#include <math_private.h>
-
+#include <float.h>
__complex__ float
__cexpf (__complex__ float x)
@@ -36,20 +36,35 @@ __cexpf (__complex__ float x)
if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
- float exp_val = __ieee754_expf (__real__ x);
+ const int t = (int) ((FLT_MAX_EXP - 1) * M_LN2);
float sinix, cosix;
__sincosf (__imag__ x, &sinix, &cosix);
- if (isfinite (exp_val))
+ if (__real__ x > t)
{
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
+ float exp_t = __ieee754_expf (t);
+ __real__ x -= t;
+ sinix *= exp_t;
+ cosix *= exp_t;
+ if (__real__ x > t)
+ {
+ __real__ x -= t;
+ sinix *= exp_t;
+ cosix *= exp_t;
+ }
+ }
+ if (__real__ x > t)
+ {
+ /* Overflow (original real part of x > 3t). */
+ __real__ retval = FLT_MAX * cosix;
+ __imag__ retval = FLT_MAX * sinix;
}
else
{
- __real__ retval = __copysignf (exp_val, cosix);
- __imag__ retval = __copysignf (exp_val, sinix);
+ float exp_val = __ieee754_expf (__real__ x);
+ __real__ retval = exp_val * cosix;
+ __imag__ retval = exp_val * sinix;
}
}
else
diff --git a/math/s_cexpl.c b/math/s_cexpl.c
index 3059880dbc..256824924f 100644
--- a/math/s_cexpl.c
+++ b/math/s_cexpl.c
@@ -1,5 +1,5 @@
/* Return value of complex exponential function for long double complex value.
- Copyright (C) 1997, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,7 +21,7 @@
#include <fenv.h>
#include <math.h>
#include <math_private.h>
-
+#include <float.h>
__complex__ long double
__cexpl (__complex__ long double x)
@@ -36,20 +36,35 @@ __cexpl (__complex__ long double x)
if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
- long double exp_val = __ieee754_expl (__real__ x);
+ const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l);
long double sinix, cosix;
__sincosl (__imag__ x, &sinix, &cosix);
- if (isfinite (exp_val))
+ if (__real__ x > t)
{
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
+ long double exp_t = __ieee754_expl (t);
+ __real__ x -= t;
+ sinix *= exp_t;
+ cosix *= exp_t;
+ if (__real__ x > t)
+ {
+ __real__ x -= t;
+ sinix *= exp_t;
+ cosix *= exp_t;
+ }
+ }
+ if (__real__ x > t)
+ {
+ /* Overflow (original real part of x > 3t). */
+ __real__ retval = LDBL_MAX * cosix;
+ __imag__ retval = LDBL_MAX * sinix;
}
else
{
- __real__ retval = __copysignl (exp_val, cosix);
- __imag__ retval = __copysignl (exp_val, sinix);
+ long double exp_val = __ieee754_expl (__real__ x);
+ __real__ retval = exp_val * cosix;
+ __imag__ retval = exp_val * sinix;
}
}
else
diff --git a/math/w_exp2.c b/math/w_exp2.c
index 7a3b0afb74..b5d8e25702 100644
--- a/math/w_exp2.c
+++ b/math/w_exp2.c
@@ -2,23 +2,19 @@
* wrapper exp2(x)
*/
-#include <float.h>
#include <math.h>
#include <math_private.h>
-static const double o_threshold = (double) DBL_MAX_EXP;
-static const double u_threshold = (double) (DBL_MIN_EXP - DBL_MANT_DIG - 1);
-
double
__exp2 (double x)
{
- if (__builtin_expect (islessequal (x, u_threshold)
- || isgreater (x, o_threshold), 0)
- && _LIB_VERSION != _IEEE_ && __finite (x))
+ double z = __ieee754_exp2 (x);
+ if (__builtin_expect (!__finite (z), 0)
+ && __finite (x) && _LIB_VERSION != _IEEE_)
/* exp2 overflow: 44, exp2 underflow: 45 */
- return __kernel_standard (x, x, 44 + (x <= o_threshold));
+ return __kernel_standard (x, x, 44 + !!__signbit (x));
- return __ieee754_exp2 (x);
+ return z;
}
weak_alias (__exp2, exp2)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_exp2f.c b/math/w_exp2f.c
index c4e9e94164..7c277ef390 100644
--- a/math/w_exp2f.c
+++ b/math/w_exp2f.c
@@ -2,22 +2,18 @@
* wrapper exp2f(x)
*/
-#include <float.h>
#include <math.h>
#include <math_private.h>
-static const float o_threshold = (float) FLT_MAX_EXP;
-static const float u_threshold = (float) (FLT_MIN_EXP - FLT_MANT_DIG - 1);
-
float
__exp2f (float x)
{
- if (__builtin_expect (islessequal (x, u_threshold)
- || isgreater (x, o_threshold), 0)
- && _LIB_VERSION != _IEEE_ && __finitef (x))
+ float z = __ieee754_exp2f (x);
+ if (__builtin_expect (!__finitef (z), 0)
+ && __finitef (x) && _LIB_VERSION != _IEEE_)
/* exp2 overflow: 144, exp2 underflow: 145 */
- return __kernel_standard_f (x, x, 144 + (x <= o_threshold));
+ return __kernel_standard_f (x, x, 144 + !!__signbitf (x));
- return __ieee754_exp2f (x);
+ return z;
}
weak_alias (__exp2f, exp2f)
diff --git a/math/w_exp2l.c b/math/w_exp2l.c
index 442a637347..f05a8fe6d6 100644
--- a/math/w_exp2l.c
+++ b/math/w_exp2l.c
@@ -2,23 +2,18 @@
* wrapper exp2l(x)
*/
-#include <float.h>
#include <math.h>
#include <math_private.h>
-static const long double o_threshold = (long double) LDBL_MAX_EXP;
-static const long double u_threshold
- = (long double) (LDBL_MIN_EXP - LDBL_MANT_DIG - 1);
-
long double
__exp2l (long double x)
{
- if (__builtin_expect (islessequal (x, u_threshold)
- || isgreater (x, o_threshold), 0)
- && _LIB_VERSION != _IEEE_ && __finitel (x))
+ long double z = __ieee754_exp2l (x);
+ if (__builtin_expect (!__finitel (z), 0)
+ && __finitel (x) && _LIB_VERSION != _IEEE_)
/* exp2 overflow: 244, exp2 underflow: 245 */
- return __kernel_standard (x, x, 244 + (x <= o_threshold));
+ return __kernel_standard (x, x, 244 + !!__signbitl (x));
- return __ieee754_exp2l (x);
+ return z;
}
weak_alias (__exp2l, exp2l)
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 7c6005b413..ad345f9505 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,18 @@
+2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
+ register char * __asm__("rsp") to get stack frame.
+
+2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
+ __NR_futex directly.
+
+2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
+ _Unwind_Ptr first.
+
2012-03-16 David S. Miller <davem@davemloft.net>
[BZ #13844]
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
index ab7ca6ae9e..dada21c2a5 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
@@ -43,7 +43,7 @@
# endif
#endif
-#define SYS_futex 202
+#define SYS_futex __NR_futex
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
#define FUTEX_CMP_REQUEUE 4
diff --git a/nptl/sysdeps/x86_64/pthreaddef.h b/nptl/sysdeps/x86_64/pthreaddef.h
index 7e45be47ab..50587b8692 100644
--- a/nptl/sysdeps/x86_64/pthreaddef.h
+++ b/nptl/sysdeps/x86_64/pthreaddef.h
@@ -41,7 +41,7 @@
/* Location of current stack frame. The frame pointer is not usable. */
#define CURRENT_STACK_FRAME \
- ({ char *frame; asm ("movq %%rsp, %0" : "=r" (frame)); frame; })
+ ({ register char *frame __asm__("rsp"); frame; })
/* XXX Until we have a better place keep the definitions here. */
diff --git a/nptl/unwind.c b/nptl/unwind.c
index 05710269c1..7ccb21382b 100644
--- a/nptl/unwind.c
+++ b/nptl/unwind.c
@@ -68,7 +68,7 @@ unwind_stop (int version, _Unwind_Action actions,
registered with the old method which would be unwound by this
step. */
struct _pthread_cleanup_buffer *oldp = buf->priv.data.cleanup;
- void *cfa = (void *) _Unwind_GetCFA (context);
+ void *cfa = (void *) (_Unwind_Ptr) _Unwind_GetCFA (context);
if (curp != oldp && (do_longjump || FRAME_LEFT (cfa, curp, adj)))
{
diff --git a/nscd/Makefile b/nscd/Makefile
index 9503f53908..ba052eb9de 100644
--- a/nscd/Makefile
+++ b/nscd/Makefile
@@ -46,11 +46,6 @@ extra-objs = $(nscd-modules:=.o)
endif
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
-endif
-
all-nscd-modules := $(nscd-modules) selinux
ifeq (yes,$(have-selinux))
ifeq (yes,$(have-libaudit))
diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c
index ac3d85fc39..54372e4ef0 100644
--- a/nscd/nscd_getgr_r.c
+++ b/nscd/nscd_getgr_r.c
@@ -31,7 +31,7 @@
#include <sys/uio.h>
#include <sys/un.h>
#include <not-cancel.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include "nscd-client.h"
#include "nscd_proto.h"
diff --git a/nscd/nscd_getpw_r.c b/nscd/nscd_getpw_r.c
index 409b672ee0..e405057d16 100644
--- a/nscd/nscd_getpw_r.c
+++ b/nscd/nscd_getpw_r.c
@@ -30,7 +30,7 @@
#include <sys/uio.h>
#include <sys/un.h>
#include <not-cancel.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include "nscd-client.h"
#include "nscd_proto.h"
diff --git a/nscd/nscd_getserv_r.c b/nscd/nscd_getserv_r.c
index ff85d8299f..acf7e22f82 100644
--- a/nscd/nscd_getserv_r.c
+++ b/nscd/nscd_getserv_r.c
@@ -20,7 +20,7 @@
#include <errno.h>
#include <string.h>
#include <not-cancel.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include "nscd-client.h"
#include "nscd_proto.h"
diff --git a/nss/Makefile b/nss/Makefile
index 13accaa01d..54d50d051c 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -43,11 +43,6 @@ xtests = bug-erange
include ../Makeconfig
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
-endif
-
# Specify rules for the nss_* modules. We have some services.
services := files db
@@ -74,19 +69,16 @@ generated += $(filter-out db-alias.c db-netgrp.c, \
install-others += $(inst_vardbdir)/Makefile
-# Build static module if requested
-ifneq ($(build-static-nss),yes)
+# Build static module into libc if requested
libnss_files-inhibit-o = $(filter-out .os,$(object-suffixes))
libnss_db-inhibit-o = $(filter-out .os,$(object-suffixes))
+ifeq ($(build-static-nss),yes)
+routines += $(libnss_files-routines)
+static-only-routines += $(libnss_files-routines)
endif
include ../Rules
-
-ifeq (yes,$(build-static-nss))
-$(objpfx)getent: $(objpfx)libnss_files.a
-endif
-
ifeq (yes,$(have-selinux))
LDLIBS-makedb := -lselinux
endif
diff --git a/nss/getnssent.c b/nss/getnssent.c
index 014b37681b..6c1eac9d6d 100644
--- a/nss/getnssent.c
+++ b/nss/getnssent.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2004, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ __nss_getent (getent_r_function func, void **resbuf, char **buffer,
*buffer = malloc (*buffer_size);
}
- while (buffer != NULL
+ while (*buffer != NULL
&& func (resbuf, *buffer, *buffer_size, &result, h_errnop) == ERANGE
&& (h_errnop == NULL || *h_errnop == NETDB_INTERNAL))
{
diff --git a/posix/Makefile b/posix/Makefile
index da6a325a97..922f9c0884 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -112,14 +112,6 @@ generated := $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
include ../Rules
-ifeq (yes,$(build-static-nss))
-# We need it for "make check" only. We can skip them if they haven't
-# been built yet during "make".
-otherlibs += $(wildcard $(nssobjdir)/libnss_files.a \
- $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a)
-endif
-
ifeq (no,$(cross-compiling))
# globtest and wordexp-test currently only works with shared libraries
ifeq (yes,$(build-shared))
diff --git a/posix/confstr.c b/posix/confstr.c
index 3c9566d1cf..cad65615ad 100644
--- a/posix/confstr.c
+++ b/posix/confstr.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991,1996,1997,2000-2004,2009,2010 Free
- Software Foundation, Inc.
+/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,6 +34,10 @@ confstr (name, buf, len)
const char *string = "";
size_t string_len = 1;
+ /* Note that this buffer must be large enough for the longest strings
+ used below. */
+ char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"];
+
switch (name)
{
case _CS_PATH:
@@ -53,59 +56,55 @@ confstr (name, buf, len)
wint_t types are no greater than the width of type long.
Currently this means all environment which the system allows. */
- {
- char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"];
-
- string_len = 0;
+ string_len = 0;
#ifndef _POSIX_V7_ILP32_OFF32
- if (__sysconf (_SC_V7_ILP32_OFF32) > 0)
+ if (__sysconf (_SC_V7_ILP32_OFF32) > 0)
#endif
#if !defined _POSIX_V7_ILP32_OFF32 || _POSIX_V7_ILP32_OFF32 > 0
- {
- memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32",
- sizeof "POSIX_V7_ILP32_OFF32" - 1);
- string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1;
- }
+ {
+ memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32",
+ sizeof "POSIX_V7_ILP32_OFF32" - 1);
+ string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1;
+ }
#endif
#ifndef _POSIX_V7_ILP32_OFFBIG
- if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0)
+ if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0)
#endif
#if !defined _POSIX_V7_ILP32_OFFBIG || _POSIX_V7_ILP32_OFFBIG > 0
- {
- if (string_len)
- restenvs[string_len++] = '\n';
- memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG",
- sizeof "POSIX_V7_ILP32_OFFBIG" - 1);
- string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1;
- }
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG",
+ sizeof "POSIX_V7_ILP32_OFFBIG" - 1);
+ string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1;
+ }
#endif
#ifndef _POSIX_V7_LP64_OFF64
- if (__sysconf (_SC_V7_LP64_OFF64) > 0)
+ if (__sysconf (_SC_V7_LP64_OFF64) > 0)
#endif
#if !defined _POSIX_V7_LP64_OFF64 || _POSIX_V7_LP64_OFF64 > 0
- {
- if (string_len)
- restenvs[string_len++] = '\n';
- memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64",
- sizeof "POSIX_V7_LP64_OFF64" - 1);
- string_len += sizeof "POSIX_V7_LP64_OFF64" - 1;
- }
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64",
+ sizeof "POSIX_V7_LP64_OFF64" - 1);
+ string_len += sizeof "POSIX_V7_LP64_OFF64" - 1;
+ }
#endif
#ifndef _POSIX_V7_LPBIG_OFFBIG
- if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0)
+ if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0)
#endif
#if !defined _POSIX_V7_LPBIG_OFFBIG || _POSIX_V7_LPBIG_OFFBIG > 0
- {
- if (string_len)
- restenvs[string_len++] = '\n';
- memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG",
- sizeof "POSIX_V7_LPBIG_OFFBIG" - 1);
- string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1;
- }
-#endif
- restenvs[string_len++] = '\0';
- string = restenvs;
- }
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG",
+ sizeof "POSIX_V7_LPBIG_OFFBIG" - 1);
+ string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1;
+ }
+#endif
+ restenvs[string_len++] = '\0';
+ string = restenvs;
break;
case _CS_V6_WIDTH_RESTRICTED_ENVS:
@@ -116,59 +115,55 @@ confstr (name, buf, len)
wint_t types are no greater than the width of type long.
Currently this means all environment which the system allows. */
- {
- char restenvs[4 * sizeof "POSIX_V6_LPBIG_OFFBIG"];
-
- string_len = 0;
+ string_len = 0;
#ifndef _POSIX_V6_ILP32_OFF32
- if (__sysconf (_SC_V6_ILP32_OFF32) > 0)
+ if (__sysconf (_SC_V6_ILP32_OFF32) > 0)
#endif
#if !defined _POSIX_V6_ILP32_OFF32 || _POSIX_V6_ILP32_OFF32 > 0
- {
- memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32",
- sizeof "POSIX_V6_ILP32_OFF32" - 1);
- string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1;
- }
+ {
+ memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32",
+ sizeof "POSIX_V6_ILP32_OFF32" - 1);
+ string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1;
+ }
#endif
#ifndef _POSIX_V6_ILP32_OFFBIG
- if (__sysconf (_SC_V6_ILP32_OFFBIG) > 0)
+ if (__sysconf (_SC_V6_ILP32_OFFBIG) > 0)
#endif
#if !defined _POSIX_V6_ILP32_OFFBIG || _POSIX_V6_ILP32_OFFBIG > 0
- {
- if (string_len)
- restenvs[string_len++] = '\n';
- memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG",
- sizeof "POSIX_V6_ILP32_OFFBIG" - 1);
- string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1;
- }
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG",
+ sizeof "POSIX_V6_ILP32_OFFBIG" - 1);
+ string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1;
+ }
#endif
#ifndef _POSIX_V6_LP64_OFF64
- if (__sysconf (_SC_V6_LP64_OFF64) > 0)
+ if (__sysconf (_SC_V6_LP64_OFF64) > 0)
#endif
#if !defined _POSIX_V6_LP64_OFF64 || _POSIX_V6_LP64_OFF64 > 0
- {
- if (string_len)
- restenvs[string_len++] = '\n';
- memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64",
- sizeof "POSIX_V6_LP64_OFF64" - 1);
- string_len += sizeof "POSIX_V6_LP64_OFF64" - 1;
- }
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64",
+ sizeof "POSIX_V6_LP64_OFF64" - 1);
+ string_len += sizeof "POSIX_V6_LP64_OFF64" - 1;
+ }
#endif
#ifndef _POSIX_V6_LPBIG_OFFBIG
- if (__sysconf (_SC_V6_LPBIG_OFFBIG) > 0)
+ if (__sysconf (_SC_V6_LPBIG_OFFBIG) > 0)
#endif
#if !defined _POSIX_V6_LPBIG_OFFBIG || _POSIX_V6_LPBIG_OFFBIG > 0
- {
- if (string_len)
- restenvs[string_len++] = '\n';
- memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG",
- sizeof "POSIX_V6_LPBIG_OFFBIG" - 1);
- string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1;
- }
-#endif
- restenvs[string_len++] = '\0';
- string = restenvs;
- }
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG",
+ sizeof "POSIX_V6_LPBIG_OFFBIG" - 1);
+ string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1;
+ }
+#endif
+ restenvs[string_len++] = '\0';
+ string = restenvs;
break;
case _CS_V5_WIDTH_RESTRICTED_ENVS:
@@ -179,59 +174,55 @@ confstr (name, buf, len)
wint_t types are no greater than the width of type long.
Currently this means all environment which the system allows. */
- {
- char restenvs[4 * sizeof "XBS5_LPBIG_OFFBIG"];
-
- string_len = 0;
+ string_len = 0;
#ifndef _XBS5_ILP32_OFF32
- if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0)
+ if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0)
#endif
#if !defined _XBS5_ILP32_OFF32 || _XBS5_ILP32_OFF32 > 0
- {
- memcpy (restenvs + string_len, "XBS5_ILP32_OFF32",
- sizeof "XBS5_ILP32_OFF32" - 1);
- string_len += sizeof "XBS5_ILP32_OFF32" - 1;
- }
+ {
+ memcpy (restenvs + string_len, "XBS5_ILP32_OFF32",
+ sizeof "XBS5_ILP32_OFF32" - 1);
+ string_len += sizeof "XBS5_ILP32_OFF32" - 1;
+ }
#endif
#ifndef _XBS5_ILP32_OFFBIG
- if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0)
+ if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0)
#endif
#if !defined _XBS5_ILP32_OFFBIG || _XBS5_ILP32_OFFBIG > 0
- {
- if (string_len)
- restenvs[string_len++] = '\n';
- memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG",
- sizeof "XBS5_ILP32_OFFBIG" - 1);
- string_len += sizeof "XBS5_ILP32_OFFBIG" - 1;
- }
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG",
+ sizeof "XBS5_ILP32_OFFBIG" - 1);
+ string_len += sizeof "XBS5_ILP32_OFFBIG" - 1;
+ }
#endif
#ifndef _XBS5_LP64_OFF64
- if (__sysconf (_SC_XBS5_LP64_OFF64) > 0)
+ if (__sysconf (_SC_XBS5_LP64_OFF64) > 0)
#endif
#if !defined _XBS5_LP64_OFF64 || _XBS5_LP64_OFF64 > 0
- {
- if (string_len)
- restenvs[string_len++] = '\n';
- memcpy (restenvs + string_len, "XBS5_LP64_OFF64",
- sizeof "XBS5_LP64_OFF64" - 1);
- string_len += sizeof "XBS5_LP64_OFF64" - 1;
- }
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "XBS5_LP64_OFF64",
+ sizeof "XBS5_LP64_OFF64" - 1);
+ string_len += sizeof "XBS5_LP64_OFF64" - 1;
+ }
#endif
#ifndef _XBS5_LPBIG_OFFBIG
- if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0)
+ if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0)
#endif
#if !defined _XBS5_LPBIG_OFFBIG || _XBS5_LPBIG_OFFBIG > 0
- {
- if (string_len)
- restenvs[string_len++] = '\n';
- memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG",
- sizeof "XBS5_LPBIG_OFFBIG" - 1);
- string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1;
- }
-#endif
- restenvs[string_len++] = '\0';
- string = restenvs;
- }
+ {
+ if (string_len)
+ restenvs[string_len++] = '\n';
+ memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG",
+ sizeof "XBS5_LPBIG_OFFBIG" - 1);
+ string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1;
+ }
+#endif
+ restenvs[string_len++] = '\0';
+ string = restenvs;
break;
case _CS_XBS5_ILP32_OFF32_CFLAGS:
diff --git a/posix/getopt_init.c b/posix/getopt_init.c
index 9bcbd9c00d..55003d4b7e 100644
--- a/posix/getopt_init.c
+++ b/posix/getopt_init.c
@@ -27,7 +27,7 @@
#include <unistd.h>
#include <sys/types.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* Variable to synchronize work. */
char *__getopt_nonoption_flags;
diff --git a/posix/wordexp.c b/posix/wordexp.c
index ece5109ae9..5ace13720b 100644
--- a/posix/wordexp.c
+++ b/posix/wordexp.c
@@ -42,7 +42,7 @@
#include <kernel-features.h>
#include <bits/libc-lock.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* Undefine the following line for the production version. */
/* #define NDEBUG 1 */
diff --git a/pwd/Makefile b/pwd/Makefile
index a99099c8ec..1da4059cb7 100644
--- a/pwd/Makefile
+++ b/pwd/Makefile
@@ -39,8 +39,3 @@ CFLAGS-getpw.c = -fexceptions
CFLAGS-fgetpwent_r.c = -D_IO_MTSAFE_IO
endif
-
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
-endif
diff --git a/resolv/Makefile b/resolv/Makefile
index d87119385b..4777317b17 100644
--- a/resolv/Makefile
+++ b/resolv/Makefile
@@ -55,8 +55,10 @@ subdir-dirs = nss_dns
vpath %.c nss_dns
libnss_dns-routines := dns-host dns-network dns-canon
-ifneq ($(build-static-nss),yes)
libnss_dns-inhibit-o = $(filter-out .os,$(object-suffixes))
+ifeq ($(build-static-nss),yes)
+routines += $(libnss_dns-routines) $(libresolv-routines)
+static-only-routines += $(libnss_dns-routines) $(libresolv-routines)
endif
ifeq (yesyes,$(build-shared)$(have-thread-library))
diff --git a/rt/Makefile b/rt/Makefile
index 651d007aa4..941c471688 100644
--- a/rt/Makefile
+++ b/rt/Makefile
@@ -78,8 +78,3 @@ $(tests:%=$(objpfx)%-bp): $(objpfx)librt_b.a $(bounded-thread-library)
endif
tst-mqueue7-ARGS = -- $(built-program-cmd)
-
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
-endif
diff --git a/stdio-common/_itoa.c b/stdio-common/_itoa.c
index e52f666ffa..3dfff8ff64 100644
--- a/stdio-common/_itoa.c
+++ b/stdio-common/_itoa.c
@@ -25,7 +25,7 @@
#include <stdlib/gmp-impl.h>
#include <stdlib/longlong.h>
-#include "_itoa.h"
+#include <_itoa.h>
/* Canonize environment. For some architectures not all values might
diff --git a/stdio-common/_itowa.c b/stdio-common/_itowa.c
index 8047c877c9..9381d33b6c 100644
--- a/stdio-common/_itowa.c
+++ b/stdio-common/_itowa.c
@@ -24,7 +24,7 @@
#include <stdlib/gmp-impl.h>
#include <stdlib/longlong.h>
-#include "_itowa.h"
+#include <_itowa.h>
/* Canonize environment. For some architectures not all values might
@@ -85,7 +85,7 @@ extern const wchar_t _itowa_lower_digits[] attribute_hidden;
extern const wchar_t _itowa_upper_digits[] attribute_hidden;
-#if LLONG_MAX != LONG_MAX
+#if _ITOA_NEEDED
wchar_t *
_itowa (value, buflim, base, upper_case)
unsigned long long int value;
diff --git a/stdio-common/_itowa.h b/stdio-common/_itowa.h
index 0f3331144f..aa349573fc 100644
--- a/stdio-common/_itowa.h
+++ b/stdio-common/_itowa.h
@@ -20,6 +20,7 @@
#define _ITOWA_H 1
#include <features.h>
#include <wchar.h>
+#include <_itoa.h>
/* Convert VALUE into ASCII in base BASE (2..36).
Write backwards starting the character just before BUFLIM.
@@ -31,7 +32,7 @@ extern wchar_t *_itowa (unsigned long long int value, wchar_t *buflim,
static inline wchar_t *
__attribute__ ((unused, always_inline))
-_itowa_word (unsigned long value, wchar_t *buflim,
+_itowa_word (_ITOA_WORD_TYPE value, wchar_t *buflim,
unsigned int base, int upper_case)
{
extern const wchar_t _itowa_upper_digits[] attribute_hidden;
@@ -61,4 +62,10 @@ _itowa_word (unsigned long value, wchar_t *buflim,
}
#undef SPECIAL
+#if !_ITOA_NEEDED
+/* No need for special long long versions. */
+# define _itowa(value, buf, base, upper_case) \
+ _itowa_word (value, buf, base, upper_case)
+#endif
+
#endif /* itowa.h */
diff --git a/stdio-common/printf_fphex.c b/stdio-common/printf_fphex.c
index 01142f9f6d..97ed83be98 100644
--- a/stdio-common/printf_fphex.c
+++ b/stdio-common/printf_fphex.c
@@ -25,8 +25,8 @@
#include <stdio.h>
#include <string.h>
#include <wchar.h>
-#include "_itoa.h"
-#include "_itowa.h"
+#include <_itoa.h>
+#include <_itowa.h>
#include <locale/localeinfo.h>
/* #define NDEBUG 1*/ /* Undefine this for debugging assertions. */
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index e454927bfd..1e904833a3 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -26,7 +26,7 @@
#include <wchar.h>
#include <bits/libc-lock.h>
#include <sys/param.h>
-#include "_itoa.h"
+#include <_itoa.h>
#include <locale/localeinfo.h>
#include <stdio.h>
@@ -102,7 +102,7 @@
# define ISDIGIT(Ch) ((unsigned int) ((Ch) - L'0') < 10)
# define STR_LEN(Str) __wcslen (Str)
-# include "_itowa.h"
+# include <_itowa.h>
# define PUT(F, S, N) _IO_sputn ((F), (S), (N))
# define PAD(Padchar) \
diff --git a/string/_strerror.c b/string/_strerror.c
index 87540797d9..6af622634f 100644
--- a/string/_strerror.c
+++ b/string/_strerror.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* It is critical here that we always use the `dcgettext' function for
the message translation. Since <libintl.h> only defines the macro
diff --git a/sunrpc/Makefile b/sunrpc/Makefile
index e0339ad77f..48790f4da9 100644
--- a/sunrpc/Makefile
+++ b/sunrpc/Makefile
@@ -97,11 +97,6 @@ ifeq ($(have-thread-library),yes)
xtests += thrsvc
endif
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
-endif
-
ifeq (no,$(cross-compiling))
# We can only build this library if we can run the rpcgen we build.
headers += $(rpcsvc:%.x=rpcsvc/%.h)
diff --git a/stdio-common/_itoa.h b/sysdeps/generic/_itoa.h
index 8870ee0286..0a670431e4 100644
--- a/stdio-common/_itoa.h
+++ b/sysdeps/generic/_itoa.h
@@ -21,6 +21,21 @@
#include <limits.h>
+/* When long long is different from long, by default, _itoa_word is
+ provided to convert long to ASCII and _itoa is provided to convert
+ long long. A sysdeps _itoa.h can define _ITOA_NEEDED to 0 and define
+ _ITOA_WORD_TYPE to unsigned long long int to override it so that
+ _itoa_word is changed to convert long long to ASCII and _itoa is
+ mapped to _itoa_word. */
+
+#ifndef _ITOA_NEEDED
+# define _ITOA_NEEDED (LONG_MAX != LLONG_MAX)
+#endif
+#ifndef _ITOA_WORD_TYPE
+# define _ITOA_WORD_TYPE unsigned long int
+#endif
+
+
/* Convert VALUE into ASCII in base BASE (2..36).
Write backwards starting the character just before BUFLIM.
Return the address of the first (left-to-right) character in the number.
@@ -35,11 +50,11 @@ extern const char _itoa_lower_digits[];
extern const char _itoa_lower_digits_internal[] attribute_hidden;
#ifndef NOT_IN_libc
-extern char *_itoa_word (unsigned long value, char *buflim,
+extern char *_itoa_word (_ITOA_WORD_TYPE value, char *buflim,
unsigned int base, int upper_case);
#else
static inline char * __attribute__ ((unused, always_inline))
-_itoa_word (unsigned long value, char *buflim,
+_itoa_word (_ITOA_WORD_TYPE value, char *buflim,
unsigned int base, int upper_case)
{
const char *digits = (upper_case
@@ -76,12 +91,13 @@ _itoa_word (unsigned long value, char *buflim,
/* Similar to the _itoa functions, but output starts at buf and pointer
after the last written character is returned. */
-extern char *_fitoa_word (unsigned long value, char *buf, unsigned int base,
+extern char *_fitoa_word (_ITOA_WORD_TYPE value, char *buf,
+ unsigned int base,
int upper_case) attribute_hidden;
extern char *_fitoa (unsigned long long value, char *buf, unsigned int base,
int upper_case) attribute_hidden;
-#if LONG_MAX == LLONG_MAX
+#if !_ITOA_NEEDED
/* No need for special long long versions. */
# define _itoa(value, buf, base, upper_case) \
_itoa_word (value, buf, base, upper_case)
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index f4531b412a..9955430e3c 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -187,6 +187,8 @@ struct La_i86_regs;
struct La_i86_retval;
struct La_x86_64_regs;
struct La_x86_64_retval;
+struct La_x32_regs;
+struct La_x32_retval;
struct La_ppc32_regs;
struct La_ppc32_retval;
struct La_ppc64_regs;
@@ -225,6 +227,10 @@ struct audit_ifaces
uintptr_t *, struct La_x86_64_regs *,
unsigned int *, const char *name,
long int *framesizep);
+ Elf32_Addr (*x32_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
+ uintptr_t *, struct La_x32_regs *,
+ unsigned int *, const char *name,
+ long int *framesizep);
Elf32_Addr (*ppc32_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
uintptr_t *, struct La_ppc32_regs *,
unsigned int *, const char *name,
@@ -269,6 +275,11 @@ struct audit_ifaces
const struct La_x86_64_regs *,
struct La_x86_64_retval *,
const char *);
+ unsigned int (*x32_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
+ uintptr_t *,
+ const struct La_x32_regs *,
+ struct La_x86_64_retval *,
+ const char *);
unsigned int (*ppc32_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
uintptr_t *,
const struct La_ppc32_regs *,
diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure
index 49330e389d..e60b4982e4 100644
--- a/sysdeps/i386/configure
+++ b/sysdeps/i386/configure
@@ -223,11 +223,12 @@ else
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
+ test $ac_status = 0; }; }; then :
libc_cv_cc_sse4=yes
else
libc_cv_cc_sse4=no
fi
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse4" >&5
$as_echo "$libc_cv_cc_sse4" >&6; }
@@ -246,11 +247,12 @@ else
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
+ test $ac_status = 0; }; }; then :
libc_cv_as_i686=yes
else
libc_cv_as_i686=no
fi
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_as_i686" >&5
$as_echo "$libc_cv_as_i686" >&6; }
@@ -265,11 +267,12 @@ else
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
+ test $ac_status = 0; }; }; then :
libc_cv_cc_avx=yes
else
libc_cv_cc_avx=no
fi
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx" >&5
$as_echo "$libc_cv_cc_avx" >&6; }
@@ -288,11 +291,12 @@ else
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
+ test $ac_status = 0; }; }; then :
libc_cv_cc_sse2avx=yes
else
libc_cv_cc_sse2avx=no
fi
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse2avx" >&5
$as_echo "$libc_cv_cc_sse2avx" >&6; }
@@ -311,11 +315,12 @@ else
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
+ test $ac_status = 0; }; }; then :
libc_cv_cc_fma4=yes
else
libc_cv_cc_fma4=no
fi
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_fma4" >&5
$as_echo "$libc_cv_cc_fma4" >&6; }
@@ -334,11 +339,56 @@ else
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
+ test $ac_status = 0; }; }; then :
libc_cv_cc_novzeroupper=yes
else
libc_cv_cc_novzeroupper=no
fi
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_novzeroupper" >&5
$as_echo "$libc_cv_cc_novzeroupper" >&6; }
+
+# Check for support of thread-local storage handling in assembler and
+# linker.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for i386 TLS support" >&5
+$as_echo_n "checking for i386 TLS support... " >&6; }
+if ${libc_cv_386_tls+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.s <<\EOF
+ .section ".tdata", "awT", @progbits
+ .globl foo
+foo: .long 1
+ .section ".tbss", "awT", @nobits
+ .globl bar
+bar: .skip 4
+ .text
+baz: leal bar@TLSLDM(%ebx), %eax
+ leal bar@DTPOFF(%eax), %edx
+ subl foo@GOTTPOFF(%edx), %eax
+ subl $bar@TPOFF, %eax
+ movl foo@GOTNTPOFF(%edx), %ecx
+ movl %gs:(%ecx), %eax
+ movl %gs:bar@NTPOFF, %eax
+EOF
+if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ libc_cv_386_tls=yes
+else
+ libc_cv_386_tls=no
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_386_tls" >&5
+$as_echo "$libc_cv_386_tls" >&6; }
+if test $libc_cv_386_tls = no; then
+ as_fn_error $? "the assembler must support TLS" "$LINENO" 5
+fi
+
+$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
+
diff --git a/sysdeps/i386/configure.in b/sysdeps/i386/configure.in
index ec69080eb6..b9e6f9eef4 100644
--- a/sysdeps/i386/configure.in
+++ b/sysdeps/i386/configure.in
@@ -40,63 +40,51 @@ fi
dnl Check if -msse4 works.
AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl
-if AC_TRY_COMMAND([${CC-cc} -msse4 -xc /dev/null -S -o /dev/null]); then
- libc_cv_cc_sse4=yes
-else
- libc_cv_cc_sse4=no
-fi])
+LIBC_TRY_CC_OPTION([-msse4], [libc_cv_cc_sse4=yes], [libc_cv_cc_sse4=no])
+])
if test $libc_cv_cc_sse4 = yes; then
AC_DEFINE(HAVE_SSE4_SUPPORT)
fi
dnl Check if -Wa,-mtune=i686 works.
AC_CACHE_CHECK(for assembler -mtune=i686 support, libc_cv_as_i686, [dnl
-if AC_TRY_COMMAND([${CC-cc} -Wa,-mtune=i686 -xc /dev/null -S -o /dev/null]); then
- libc_cv_as_i686=yes
-else
- libc_cv_as_i686=no
-fi])
+LIBC_TRY_CC_OPTION([-Wa,-mtune=i686],
+ [libc_cv_as_i686=yes],
+ [libc_cv_as_i686=no])
+])
dnl Check if -mavx works.
AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl
-if AC_TRY_COMMAND([${CC-cc} -mavx -xc /dev/null -S -o /dev/null]); then
- libc_cv_cc_avx=yes
-else
- libc_cv_cc_avx=no
-fi])
+LIBC_TRY_CC_OPTION([-mavx], [libc_cv_cc_avx=yes], [libc_cv_cc_avx=no])
+])
if test $libc_cv_cc_avx = yes; then
AC_DEFINE(HAVE_AVX_SUPPORT)
fi
dnl Check if -msse2avx works.
AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl
-if AC_TRY_COMMAND([${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null]); then
- libc_cv_cc_sse2avx=yes
-else
- libc_cv_cc_sse2avx=no
-fi])
+LIBC_TRY_CC_OPTION([-msse2avx],
+ [libc_cv_cc_sse2avx=yes],
+ [libc_cv_cc_sse2avx=no])
+])
if test $libc_cv_cc_sse2avx = yes; then
AC_DEFINE(HAVE_SSE2AVX_SUPPORT)
fi
dnl Check if -mfma4 works.
AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl
-if AC_TRY_COMMAND([${CC-cc} -mfma4 -xc /dev/null -S -o /dev/null]); then
- libc_cv_cc_fma4=yes
-else
- libc_cv_cc_fma4=no
-fi])
+LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no])
+])
if test $libc_cv_cc_fma4 = yes; then
AC_DEFINE(HAVE_FMA4_SUPPORT)
fi
dnl Check if -mno-vzeroupper works.
AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl
-if AC_TRY_COMMAND([${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null]); then
- libc_cv_cc_novzeroupper=yes
-else
- libc_cv_cc_novzeroupper=no
-fi])
+LIBC_TRY_CC_OPTION([-mno-vzeroupper],
+ [libc_cv_cc_novzeroupper=yes],
+ [libc_cv_cc_novzeroupper=no])
+])
# Check for support of thread-local storage handling in assembler and
# linker.
diff --git a/sysdeps/i386/fpu/e_pow.S b/sysdeps/i386/fpu/e_pow.S
index 63c44f1357..1abedf6284 100644
--- a/sysdeps/i386/fpu/e_pow.S
+++ b/sysdeps/i386/fpu/e_pow.S
@@ -230,6 +230,16 @@ ENTRY(__ieee754_pow)
testb $2, %dh
jz 16f // jump if x == +inf
+ // fistpll raises invalid exception for |y| >= 1L<<63, so test
+ // that (in which case y is certainly even) before testing
+ // whether y is odd.
+ fld %st // y : y
+ fabs // |y| : y
+ fcompl MO(p63) // y
+ fnstsw
+ sahf
+ jnc 16f
+
// We must find out whether y is an odd integer.
fld %st // y : y
fistpll (%esp) // y
@@ -239,20 +249,13 @@ ENTRY(__ieee754_pow)
sahf
jne 17f
- // OK, the value is an integer, but is the number of bits small
- // enough so that all are coming from the mantissa?
+ // OK, the value is an integer.
popl %eax
cfi_adjust_cfa_offset (-4)
popl %edx
cfi_adjust_cfa_offset (-4)
andb $1, %al
jz 18f // jump if not odd
- movl %edx, %eax
- orl %edx, %edx
- jns 155f
- negl %eax
-155: cmpl $0x00200000, %eax
- ja 18f // does not fit in mantissa bits
// It's an odd integer.
shrl $31, %edx
fldl MOX(minf_mzero, %edx, 8)
@@ -289,6 +292,16 @@ ENTRY(__ieee754_pow)
testb $2, %dh
jz 25f
+ // fistpll raises invalid exception for |y| >= 1L<<63, so test
+ // that (in which case y is certainly even) before testing
+ // whether y is odd.
+ fld %st // y : y
+ fabs // |y| : y
+ fcompl MO(p63) // y
+ fnstsw
+ sahf
+ jnc 25f
+
fld %st // y : y
fistpll (%esp) // y
fildll (%esp) // int(y) : y
@@ -297,16 +310,13 @@ ENTRY(__ieee754_pow)
sahf
jne 26f
- // OK, the value is an integer, but is the number of bits small
- // enough so that all are coming from the mantissa?
+ // OK, the value is an integer.
popl %eax
cfi_adjust_cfa_offset (-4)
popl %edx
cfi_adjust_cfa_offset (-4)
andb $1, %al
jz 27f // jump if not odd
- cmpl $0xffe00000, %edx
- jbe 27f // does not fit in mantissa bits
// It's an odd integer.
// Raise divide-by-zero exception and get minus infinity value.
fldl MO(one)
@@ -329,6 +339,14 @@ ENTRY(__ieee754_pow)
21: testb $2, %dh
jz 22f
+ // fistpll raises invalid exception for |y| >= 1L<<63, so test
+ // that (in which case y is certainly even) before testing
+ // whether y is odd.
+ fcoml MO(p63) // y
+ fnstsw
+ sahf
+ jnc 22f
+
fld %st // y : y
fistpll (%esp) // y
fildll (%esp) // int(y) : y
@@ -337,16 +355,13 @@ ENTRY(__ieee754_pow)
sahf
jne 23f
- // OK, the value is an integer, but is the number of bits small
- // enough so that all are coming from the mantissa?
+ // OK, the value is an integer.
popl %eax
cfi_adjust_cfa_offset (-4)
popl %edx
cfi_adjust_cfa_offset (-4)
andb $1, %al
jz 24f // jump if not odd
- cmpl $0xffe00000, %edx
- jae 24f // does not fit in mantissa bits
// It's an odd integer.
fldl MO(mzero)
ret
diff --git a/sysdeps/i386/fpu/e_powf.S b/sysdeps/i386/fpu/e_powf.S
index cc8456d280..aa58ed2b67 100644
--- a/sysdeps/i386/fpu/e_powf.S
+++ b/sysdeps/i386/fpu/e_powf.S
@@ -224,6 +224,16 @@ ENTRY(__ieee754_powf)
testb $2, %dh
jz 16f // jump if x == +inf
+ // fistpl raises invalid exception for |y| >= 1L<<31, so test
+ // that (in which case y is certainly even) before testing
+ // whether y is odd.
+ fld %st // y : y
+ fabs // |y| : y
+ fcompl MO(p31) // y
+ fnstsw
+ sahf
+ jnc 16f
+
// We must find out whether y is an odd integer.
fld %st // y : y
fistpl (%esp) // y
@@ -233,18 +243,11 @@ ENTRY(__ieee754_powf)
sahf
jne 17f
- // OK, the value is an integer, but is the number of bits small
- // enough so that all are coming from the mantissa?
+ // OK, the value is an integer.
popl %edx
cfi_adjust_cfa_offset (-4)
testb $1, %dl
jz 18f // jump if not odd
- movl %edx, %eax
- orl %edx, %edx
- jns 155f
- negl %eax
-155: cmpl $0x01000000, %eax
- ja 18f // does not fit in mantissa bits
// It's an odd integer.
shrl $31, %edx
fldl MOX(minf_mzero, %edx, 8)
@@ -281,6 +284,16 @@ ENTRY(__ieee754_powf)
testb $2, %dh
jz 25f
+ // fistpl raises invalid exception for |y| >= 1L<<31, so test
+ // that (in which case y is certainly even) before testing
+ // whether y is odd.
+ fld %st // y : y
+ fabs // |y| : y
+ fcompl MO(p31) // y
+ fnstsw
+ sahf
+ jnc 25f
+
fld %st // y : y
fistpl (%esp) // y
fildl (%esp) // int(y) : y
@@ -289,14 +302,11 @@ ENTRY(__ieee754_powf)
sahf
jne 26f
- // OK, the value is an integer, but is the number of bits small
- // enough so that all are coming from the mantissa?
+ // OK, the value is an integer.
popl %edx
cfi_adjust_cfa_offset (-4)
testb $1, %dl
jz 27f // jump if not odd
- cmpl $0xff000000, %edx
- jbe 27f // does not fit in mantissa bits
// It's an odd integer.
// Raise divide-by-zero exception and get minus infinity value.
fldl MO(one)
@@ -319,6 +329,14 @@ ENTRY(__ieee754_powf)
21: testb $2, %dh
jz 22f
+ // fistpl raises invalid exception for |y| >= 1L<<31, so test
+ // that (in which case y is certainly even) before testing
+ // whether y is odd.
+ fcoml MO(p31) // y
+ fnstsw
+ sahf
+ jnc 22f
+
fld %st // y : y
fistpl (%esp) // y
fildl (%esp) // int(y) : y
@@ -327,14 +345,11 @@ ENTRY(__ieee754_powf)
sahf
jne 23f
- // OK, the value is an integer, but is the number of bits small
- // enough so that all are coming from the mantissa?
+ // OK, the value is an integer.
popl %edx
cfi_adjust_cfa_offset (-4)
testb $1, %dl
jz 24f // jump if not odd
- cmpl $0xff000000, %edx
- jae 24f // does not fit in mantissa bits
// It's an odd integer.
fldl MO(mzero)
ret
diff --git a/sysdeps/i386/fpu/e_powl.S b/sysdeps/i386/fpu/e_powl.S
index 5d850897c5..c0aa194c62 100644
--- a/sysdeps/i386/fpu/e_powl.S
+++ b/sysdeps/i386/fpu/e_powl.S
@@ -32,6 +32,9 @@ limit: .double 0.29
ASM_TYPE_DIRECTIVE(p63,@object)
p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
ASM_SIZE_DIRECTIVE(p63)
+ ASM_TYPE_DIRECTIVE(p64,@object)
+p64: .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x43
+ ASM_SIZE_DIRECTIVE(p64)
.section .rodata.cst16,"aM",@progbits,16
@@ -243,6 +246,19 @@ ENTRY(__ieee754_powl)
testb $2, %dh
jz 16f // jump if x == +inf
+ // fistpll raises invalid exception for |y| >= 1L<<63, but y
+ // may be odd unless we know |y| >= 1L<<64.
+ fld %st // y : y
+ fabs // |y| : y
+ fcompl MO(p64) // y
+ fnstsw
+ sahf
+ jnc 16f
+ fldl MO(p63) // p63 : y
+ fxch // y : p63
+ fprem // y%p63 : p63
+ fstp %st(1) // y%p63
+
// We must find out whether y is an odd integer.
fld %st // y : y
fistpll (%esp) // y
@@ -295,6 +311,19 @@ ENTRY(__ieee754_powl)
testb $2, %dh
jz 25f
+ // fistpll raises invalid exception for |y| >= 1L<<63, but y
+ // may be odd unless we know |y| >= 1L<<64.
+ fld %st // y : y
+ fabs // |y| : y
+ fcompl MO(p64) // y
+ fnstsw
+ sahf
+ jnc 25f
+ fldl MO(p63) // p63 : y
+ fxch // y : p63
+ fprem // y%p63 : p63
+ fstp %st(1) // y%p63
+
fld %st // y : y
fistpll (%esp) // y
fildll (%esp) // int(y) : y
@@ -332,6 +361,18 @@ ENTRY(__ieee754_powl)
21: testb $2, %dh
jz 22f
+ // fistpll raises invalid exception for |y| >= 1L<<63, but y
+ // may be odd unless we know |y| >= 1L<<64.
+ fld %st // y : y
+ fcompl MO(p64) // y
+ fnstsw
+ sahf
+ jnc 22f
+ fldl MO(p63) // p63 : y
+ fxch // y : p63
+ fprem // y%p63 : p63
+ fstp %st(1) // y%p63
+
fld %st // y : y
fistpll (%esp) // y
fildll (%esp) // int(y) : y
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index 1d87514e9b..1c791405ab 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -431,13 +431,74 @@ idouble: 1
ifloat: 1
# cexp
+Test "Real part of: cexp (-10000 + 0x1p16383 i) == 1.045876464564882298442774542991176546722e-4343 + 4.421154026488516836023811173959413420548e-4344 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
ildouble: 1
ldouble: 1
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
+Test "Real part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cexp (0 + 0x1p65 i) == 0.99888622066058013610642172179340364209972 - 0.047183876212354673805106149805700013943218 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cexp (0 - 0x1p65 i) == 0.99888622066058013610642172179340364209972 + 0.047183876212354673805106149805700013943218 i":
+float: 1
+ifloat: 1
Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (11356.5625 + 0.75 i) == 9.052188470850960144814815984311663764287e4931 + 8.432986734191301036267148978260970230200e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (1440 + 0x1p-1074 i) == inf + 1.196295853897226111293303155636183216483e302 i plus overflow exception":
+double: 1
+idouble: 1
+Test "Real part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
+double: 2
+idouble: 2
+Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i":
+double: 1
+idouble: 1
+Test "Real part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i":
+double: 1
+idouble: 1
+Test "Real part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
@@ -815,41 +876,55 @@ ifloat: 1
ildouble: 1
ldouble: 1
Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
-float: 3
-ifloat: 3
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
ildouble: 6
ldouble: 6
Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
+double: 1
+idouble: 1
ildouble: 1
ldouble: 1
Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
float: 1
ifloat: 1
Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
-double: 1
+double: 2
float: 3
-idouble: 1
+idouble: 2
ifloat: 3
ildouble: 3
ldouble: 3
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
+double: 1
+idouble: 1
+Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
double: 1
-float: 4
+float: 5
idouble: 1
-ifloat: 4
+ifloat: 5
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
-float: 1
-ifloat: 1
-ildouble: 2
-ldouble: 2
+float: 2
+ifloat: 2
+ildouble: 4
+ldouble: 4
Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
double: 2
float: 3
@@ -2124,10 +2199,18 @@ ildouble: 1
ldouble: 1
Function: Real part of "cexp":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
ildouble: 1
ldouble: 1
Function: Imaginary part of "cexp":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
ildouble: 1
ldouble: 1
@@ -2212,20 +2295,20 @@ double: 1
ldouble: 1
Function: Real part of "cpow":
-double: 1
-float: 4
-idouble: 1
-ifloat: 4
-ildouble: 6
-ldouble: 6
+double: 2
+float: 5
+idouble: 2
+ifloat: 5
+ildouble: 5
+ldouble: 5
Function: Imaginary part of "cpow":
double: 2
float: 3
idouble: 2
ifloat: 3
-ildouble: 2
-ldouble: 2
+ildouble: 4
+ldouble: 4
Function: Real part of "csin":
float: 1
diff --git a/sysdeps/i386/fpu/s_cexp.S b/sysdeps/i386/fpu/s_cexp.S
deleted file mode 100644
index e5fdb7d735..0000000000
--- a/sysdeps/i386/fpu/s_cexp.S
+++ /dev/null
@@ -1,253 +0,0 @@
-/* ix87 specific implementation of complex exponential function for double.
- Copyright (C) 1997, 2005, 2012 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-
- .section .rodata
-
- .align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(huge_nan_null_null,@object)
-huge_nan_null_null:
- .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
- .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
- .double 0.0
-zero: .double 0.0
-infinity:
- .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
- .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
- .double 0.0
- .byte 0, 0, 0, 0, 0, 0, 0, 0x80
- ASM_SIZE_DIRECTIVE(huge_nan_null_null)
-
- ASM_TYPE_DIRECTIVE(twopi,@object)
-twopi:
- .byte 0x35, 0xc2, 0x68, 0x21, 0xa2, 0xda, 0xf, 0xc9, 0x1, 0x40
- .byte 0, 0, 0, 0, 0, 0
- ASM_SIZE_DIRECTIVE(twopi)
-
- ASM_TYPE_DIRECTIVE(l2e,@object)
-l2e:
- .byte 0xbc, 0xf0, 0x17, 0x5c, 0x29, 0x3b, 0xaa, 0xb8, 0xff, 0x3f
- .byte 0, 0, 0, 0, 0, 0
- ASM_SIZE_DIRECTIVE(l2e)
-
- ASM_TYPE_DIRECTIVE(one,@object)
-one: .double 1.0
- ASM_SIZE_DIRECTIVE(one)
-
-
-#ifdef PIC
-#define MO(op) op##@GOTOFF(%ecx)
-#define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
-#else
-#define MO(op) op
-#define MOX(op,x,f) op(,x,f)
-#endif
-
- .text
-ENTRY(__cexp)
- fldl 8(%esp) /* x */
- fxam
- fnstsw
- fldl 16(%esp) /* y : x */
-#ifdef PIC
- LOAD_PIC_REG (cx)
-#endif
- movb %ah, %dh
- andb $0x45, %ah
- cmpb $0x05, %ah
- je 1f /* Jump if real part is +-Inf */
- cmpb $0x01, %ah
- je 2f /* Jump if real part is NaN */
-
- fxam /* y : x */
- fnstsw
- /* If the imaginary part is not finite we return NaN+i NaN, as
- for the case when the real part is NaN. A test for +-Inf and
- NaN would be necessary. But since we know the stack register
- we applied `fxam' to is not empty we can simply use one test.
- Check your FPU manual for more information. */
- andb $0x01, %ah
- cmpb $0x01, %ah
- je 20f
-
- /* We have finite numbers in the real and imaginary part. Do
- the real work now. */
- fxch /* x : y */
- fldt MO(l2e) /* log2(e) : x : y */
- fmulp /* x * log2(e) : y */
- fld %st /* x * log2(e) : x * log2(e) : y */
- frndint /* int(x * log2(e)) : x * log2(e) : y */
- fsubr %st, %st(1) /* int(x * log2(e)) : frac(x * log2(e)) : y */
- fxch /* frac(x * log2(e)) : int(x * log2(e)) : y */
- f2xm1 /* 2^frac(x * log2(e))-1 : int(x * log2(e)) : y */
- faddl MO(one) /* 2^frac(x * log2(e)) : int(x * log2(e)) : y */
- fscale /* e^x : int(x * log2(e)) : y */
- fst %st(1) /* e^x : e^x : y */
- fxch %st(2) /* y : e^x : e^x */
- fsincos /* cos(y) : sin(y) : e^x : e^x */
- fnstsw
- testl $0x400, %eax
- jnz 7f
- fmulp %st, %st(3) /* sin(y) : e^x : e^x * cos(y) */
- fmulp %st, %st(1) /* e^x * sin(y) : e^x * cos(y) */
- movl 4(%esp), %eax /* Pointer to memory for result. */
- fstpl 8(%eax)
- fstpl (%eax)
- ret $4
-
- /* We have to reduce the argument to fsincos. */
- .align ALIGNARG(4)
-7: fldt MO(twopi) /* 2*pi : y : e^x : e^x */
- fxch /* y : 2*pi : e^x : e^x */
-8: fprem1 /* y%(2*pi) : 2*pi : e^x : e^x */
- fnstsw
- testl $0x400, %eax
- jnz 8b
- fstp %st(1) /* y%(2*pi) : e^x : e^x */
- fsincos /* cos(y) : sin(y) : e^x : e^x */
- fmulp %st, %st(3)
- fmulp %st, %st(1)
- movl 4(%esp), %eax /* Pointer to memory for result. */
- fstpl 8(%eax)
- fstpl (%eax)
- ret $4
-
- /* The real part is +-inf. We must make further differences. */
- .align ALIGNARG(4)
-1: fxam /* y : x */
- fnstsw
- movb %ah, %dl
- testb $0x01, %ah /* See above why 0x01 is usable here. */
- jne 3f
-
-
- /* The real part is +-Inf and the imaginary part is finite. */
- andl $0x245, %edx
- cmpb $0x40, %dl /* Imaginary part == 0? */
- je 4f /* Yes -> */
-
- fxch /* x : y */
- shrl $5, %edx
- fstp %st(0) /* y */ /* Drop the real part. */
- andl $16, %edx /* This puts the sign bit of the real part
- in bit 4. So we can use it to index a
- small array to select 0 or Inf. */
- fsincos /* cos(y) : sin(y) */
- fnstsw
- testl $0x0400, %eax
- jnz 5f
- fldl MOX(huge_nan_null_null,%edx,1)
- movl 4(%esp), %edx /* Pointer to memory for result. */
- fstl 8(%edx)
- fstpl (%edx)
- ftst
- fnstsw
- shll $23, %eax
- andl $0x80000000, %eax
- orl %eax, 4(%edx)
- fstp %st(0)
- ftst
- fnstsw
- shll $23, %eax
- andl $0x80000000, %eax
- orl %eax, 12(%edx)
- fstp %st(0)
- ret $4
- /* We must reduce the argument to fsincos. */
- .align ALIGNARG(4)
-5: fldt MO(twopi)
- fxch
-6: fprem1
- fnstsw
- testl $0x400, %eax
- jnz 6b
- fstp %st(1)
- fsincos
- fldl MOX(huge_nan_null_null,%edx,1)
- movl 4(%esp), %edx /* Pointer to memory for result. */
- fstl 8(%edx)
- fstpl (%edx)
- ftst
- fnstsw
- shll $23, %eax
- andl $0x80000000, %eax
- orl %eax, 4(%edx)
- fstp %st(0)
- ftst
- fnstsw
- shll $23, %eax
- andl $0x80000000, %eax
- orl %eax, 12(%edx)
- fstp %st(0)
- ret $4
-
- /* The real part is +-Inf and the imaginary part is +-0. So return
- +-Inf+-0i. */
- .align ALIGNARG(4)
-4: movl 4(%esp), %eax /* Pointer to memory for result. */
- fstpl 8(%eax)
- shrl $5, %edx
- fstp %st(0)
- andl $16, %edx
- fldl MOX(huge_nan_null_null,%edx,1)
- fstpl (%eax)
- ret $4
-
- /* The real part is +-Inf, the imaginary is also is not finite. */
- .align ALIGNARG(4)
-3: fstp %st(0)
- fstp %st(0) /* <empty> */
- andb $0x45, %ah
- andb $0x47, %dh
- xorb %dh, %ah
- jnz 30f
- fldl MO(infinity) /* Raise invalid exception. */
- fmull MO(zero)
- fstp %st(0)
-30: movl %edx, %eax
- shrl $5, %edx
- shll $4, %eax
- andl $16, %edx
- andl $32, %eax
- orl %eax, %edx
- movl 4(%esp), %eax /* Pointer to memory for result. */
-
- fldl MOX(huge_nan_null_null,%edx,1)
- fldl MOX(huge_nan_null_null+8,%edx,1)
- fxch
- fstpl (%eax)
- fstpl 8(%eax)
- ret $4
-
- /* The real part is NaN. */
- .align ALIGNARG(4)
-20: fldl MO(infinity) /* Raise invalid exception. */
- fmull MO(zero)
- fstp %st(0)
-2: fstp %st(0)
- fstp %st(0)
- movl 4(%esp), %eax /* Pointer to memory for result. */
- fldl MO(huge_nan_null_null+8)
- fstl (%eax)
- fstpl 8(%eax)
- ret $4
-
-END(__cexp)
-weak_alias (__cexp, cexp)
diff --git a/sysdeps/i386/fpu/s_cexpf.S b/sysdeps/i386/fpu/s_cexpf.S
deleted file mode 100644
index 6ed66e6d04..0000000000
--- a/sysdeps/i386/fpu/s_cexpf.S
+++ /dev/null
@@ -1,257 +0,0 @@
-/* ix87 specific implementation of complex exponential function for double.
- Copyright (C) 1997, 2005, 2012 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-
- .section .rodata
-
- .align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(huge_nan_null_null,@object)
-huge_nan_null_null:
- .byte 0, 0, 0x80, 0x7f
- .byte 0, 0, 0xc0, 0x7f
- .float 0.0
-zero: .float 0.0
-infinity:
- .byte 0, 0, 0x80, 0x7f
- .byte 0, 0, 0xc0, 0x7f
- .float 0.0
- .byte 0, 0, 0, 0x80
- ASM_SIZE_DIRECTIVE(huge_nan_null_null)
-
- ASM_TYPE_DIRECTIVE(twopi,@object)
-twopi:
- .byte 0x35, 0xc2, 0x68, 0x21, 0xa2, 0xda, 0xf, 0xc9, 0x1, 0x40
- .byte 0, 0, 0, 0, 0, 0
- ASM_SIZE_DIRECTIVE(twopi)
-
- ASM_TYPE_DIRECTIVE(l2e,@object)
-l2e:
- .byte 0xbc, 0xf0, 0x17, 0x5c, 0x29, 0x3b, 0xaa, 0xb8, 0xff, 0x3f
- .byte 0, 0, 0, 0, 0, 0
- ASM_SIZE_DIRECTIVE(l2e)
-
- ASM_TYPE_DIRECTIVE(one,@object)
-one: .double 1.0
- ASM_SIZE_DIRECTIVE(one)
-
-
-#ifdef PIC
-#define MO(op) op##@GOTOFF(%ecx)
-#define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
-#else
-#define MO(op) op
-#define MOX(op,x,f) op(,x,f)
-#endif
-
- .text
-ENTRY(__cexpf)
- flds 4(%esp) /* x */
- fxam
- fnstsw
- flds 8(%esp) /* y : x */
-#ifdef PIC
- LOAD_PIC_REG (cx)
-#endif
- movb %ah, %dh
- andb $0x45, %ah
- cmpb $0x05, %ah
- je 1f /* Jump if real part is +-Inf */
- cmpb $0x01, %ah
- je 2f /* Jump if real part is NaN */
-
- fxam /* y : x */
- fnstsw
- /* If the imaginary part is not finite we return NaN+i NaN, as
- for the case when the real part is NaN. A test for +-Inf and
- NaN would be necessary. But since we know the stack register
- we applied `fxam' to is not empty we can simply use one test.
- Check your FPU manual for more information. */
- andb $0x01, %ah
- cmpb $0x01, %ah
- je 20f
-
- /* We have finite numbers in the real and imaginary part. Do
- the real work now. */
- fxch /* x : y */
- fldt MO(l2e) /* log2(e) : x : y */
- fmulp /* x * log2(e) : y */
- fld %st /* x * log2(e) : x * log2(e) : y */
- frndint /* int(x * log2(e)) : x * log2(e) : y */
- fsubr %st, %st(1) /* int(x * log2(e)) : frac(x * log2(e)) : y */
- fxch /* frac(x * log2(e)) : int(x * log2(e)) : y */
- f2xm1 /* 2^frac(x * log2(e))-1 : int(x * log2(e)) : y */
- faddl MO(one) /* 2^frac(x * log2(e)) : int(x * log2(e)) : y */
- fscale /* e^x : int(x * log2(e)) : y */
- fst %st(1) /* e^x : e^x : y */
- fxch %st(2) /* y : e^x : e^x */
- fsincos /* cos(y) : sin(y) : e^x : e^x */
- fnstsw
- testl $0x400, %eax
- jnz 7f
- fmulp %st, %st(3) /* sin(y) : e^x : e^x * cos(y) */
- fmulp %st, %st(1) /* e^x * sin(y) : e^x * cos(y) */
- subl $8, %esp
- cfi_adjust_cfa_offset (8)
- fstps 4(%esp)
- fstps (%esp)
- popl %eax
- cfi_adjust_cfa_offset (-4)
- popl %edx
- cfi_adjust_cfa_offset (-4)
- ret
-
- /* We have to reduce the argument to fsincos. */
- .align ALIGNARG(4)
-7: fldt MO(twopi) /* 2*pi : y : e^x : e^x */
- fxch /* y : 2*pi : e^x : e^x */
-8: fprem1 /* y%(2*pi) : 2*pi : e^x : e^x */
- fnstsw
- testl $0x400, %eax
- jnz 8b
- fstp %st(1) /* y%(2*pi) : e^x : e^x */
- fsincos /* cos(y) : sin(y) : e^x : e^x */
- fmulp %st, %st(3)
- fmulp %st, %st(1)
- subl $8, %esp
- cfi_adjust_cfa_offset (8)
- fstps 4(%esp)
- fstps (%esp)
- popl %eax
- cfi_adjust_cfa_offset (-4)
- popl %edx
- cfi_adjust_cfa_offset (-4)
- ret
-
- /* The real part is +-inf. We must make further differences. */
- .align ALIGNARG(4)
-1: fxam /* y : x */
- fnstsw
- movb %ah, %dl
- testb $0x01, %ah /* See above why 0x01 is usable here. */
- jne 3f
-
-
- /* The real part is +-Inf and the imaginary part is finite. */
- andl $0x245, %edx
- cmpb $0x40, %dl /* Imaginary part == 0? */
- je 4f /* Yes -> */
-
- fxch /* x : y */
- shrl $6, %edx
- fstp %st(0) /* y */ /* Drop the real part. */
- andl $8, %edx /* This puts the sign bit of the real part
- in bit 3. So we can use it to index a
- small array to select 0 or Inf. */
- fsincos /* cos(y) : sin(y) */
- fnstsw
- testl $0x0400, %eax
- jnz 5f
- fxch
- ftst
- fnstsw
- fstp %st(0)
- shll $23, %eax
- andl $0x80000000, %eax
- orl MOX(huge_nan_null_null,%edx,1), %eax
- movl MOX(huge_nan_null_null,%edx,1), %ecx
- movl %eax, %edx
- ftst
- fnstsw
- fstp %st(0)
- shll $23, %eax
- andl $0x80000000, %eax
- orl %ecx, %eax
- ret
- /* We must reduce the argument to fsincos. */
- .align ALIGNARG(4)
-5: fldt MO(twopi)
- fxch
-6: fprem1
- fnstsw
- testl $0x400, %eax
- jnz 6b
- fstp %st(1)
- fsincos
- fxch
- ftst
- fnstsw
- fstp %st(0)
- shll $23, %eax
- andl $0x80000000, %eax
- orl MOX(huge_nan_null_null,%edx,1), %eax
- movl MOX(huge_nan_null_null,%edx,1), %ecx
- movl %eax, %edx
- ftst
- fnstsw
- fstp %st(0)
- shll $23, %eax
- andl $0x80000000, %eax
- orl %ecx, %eax
- ret
-
- /* The real part is +-Inf and the imaginary part is +-0. So return
- +-Inf+-0i. */
- .align ALIGNARG(4)
-4: subl $4, %esp
- cfi_adjust_cfa_offset (4)
- fstps (%esp)
- shrl $6, %edx
- fstp %st(0)
- andl $8, %edx
- movl MOX(huge_nan_null_null,%edx,1), %eax
- popl %edx
- cfi_adjust_cfa_offset (-4)
- ret
-
- /* The real part is +-Inf, the imaginary is also is not finite. */
- .align ALIGNARG(4)
-3: fstp %st(0)
- fstp %st(0) /* <empty> */
- andb $0x45, %ah
- andb $0x47, %dh
- xorb %dh, %ah
- jnz 30f
- flds MO(infinity) /* Raise invalid exception. */
- fmuls MO(zero)
- fstp %st(0)
-30: movl %edx, %eax
- shrl $6, %edx
- shll $3, %eax
- andl $8, %edx
- andl $16, %eax
- orl %eax, %edx
-
- movl MOX(huge_nan_null_null,%edx,1), %eax
- movl MOX(huge_nan_null_null+4,%edx,1), %edx
- ret
-
- /* The real part is NaN. */
- .align ALIGNARG(4)
-20: flds MO(infinity) /* Raise invalid exception. */
- fmuls MO(zero)
- fstp %st(0)
-2: fstp %st(0)
- fstp %st(0)
- movl MO(huge_nan_null_null+4), %eax
- movl %eax, %edx
- ret
-
-END(__cexpf)
-weak_alias (__cexpf, cexpf)
diff --git a/sysdeps/i386/fpu/s_cexpl.S b/sysdeps/i386/fpu/s_cexpl.S
deleted file mode 100644
index ab02a172ad..0000000000
--- a/sysdeps/i386/fpu/s_cexpl.S
+++ /dev/null
@@ -1,256 +0,0 @@
-/* ix87 specific implementation of complex exponential function for double.
- Copyright (C) 1997, 2005, 2012 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-
- .section .rodata
-
- .align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(huge_nan_null_null,@object)
-huge_nan_null_null:
- .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
- .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
- .double 0.0
-zero: .double 0.0
-infinity:
- .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
- .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
- .double 0.0
- .byte 0, 0, 0, 0, 0, 0, 0, 0x80
- ASM_SIZE_DIRECTIVE(huge_nan_null_null)
-
- ASM_TYPE_DIRECTIVE(twopi,@object)
-twopi:
- .byte 0x35, 0xc2, 0x68, 0x21, 0xa2, 0xda, 0xf, 0xc9, 0x1, 0x40
- .byte 0, 0, 0, 0, 0, 0
- ASM_SIZE_DIRECTIVE(twopi)
-
- ASM_TYPE_DIRECTIVE(l2e,@object)
-l2e:
- .byte 0xbc, 0xf0, 0x17, 0x5c, 0x29, 0x3b, 0xaa, 0xb8, 0xff, 0x3f
- .byte 0, 0, 0, 0, 0, 0
- ASM_SIZE_DIRECTIVE(l2e)
-
- ASM_TYPE_DIRECTIVE(one,@object)
-one: .double 1.0
- ASM_SIZE_DIRECTIVE(one)
-
-
-#ifdef PIC
-#define MO(op) op##@GOTOFF(%ecx)
-#define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
-#else
-#define MO(op) op
-#define MOX(op,x,f) op(,x,f)
-#endif
-
- .text
-ENTRY(__cexpl)
- fldt 8(%esp) /* x */
- fxam
- fnstsw
- fldt 20(%esp) /* y : x */
-#ifdef PIC
- LOAD_PIC_REG (cx)
-#endif
- movb %ah, %dh
- andb $0x45, %ah
- cmpb $0x05, %ah
- je 1f /* Jump if real part is +-Inf */
- cmpb $0x01, %ah
- je 2f /* Jump if real part is NaN */
-
- fxam /* y : x */
- fnstsw
- /* If the imaginary part is not finite we return NaN+i NaN, as
- for the case when the real part is NaN. A test for +-Inf and
- NaN would be necessary. But since we know the stack register
- we applied `fxam' to is not empty we can simply use one test.
- Check your FPU manual for more information. */
- andb $0x01, %ah
- cmpb $0x01, %ah
- je 20f
-
- /* We have finite numbers in the real and imaginary part. Do
- the real work now. */
- fxch /* x : y */
- fldt MO(l2e) /* log2(e) : x : y */
- fmulp /* x * log2(e) : y */
- fld %st /* x * log2(e) : x * log2(e) : y */
- frndint /* int(x * log2(e)) : x * log2(e) : y */
- fsubr %st, %st(1) /* int(x * log2(e)) : frac(x * log2(e)) : y */
- fxch /* frac(x * log2(e)) : int(x * log2(e)) : y */
- f2xm1 /* 2^frac(x * log2(e))-1 : int(x * log2(e)) : y */
- faddl MO(one) /* 2^frac(x * log2(e)) : int(x * log2(e)) : y */
- fscale /* e^x : int(x * log2(e)) : y */
- fst %st(1) /* e^x : e^x : y */
- fxch %st(2) /* y : e^x : e^x */
- fsincos /* cos(y) : sin(y) : e^x : e^x */
- fnstsw
- testl $0x400, %eax
- jnz 7f
- fmulp %st, %st(3) /* sin(y) : e^x : e^x * cos(y) */
- fmulp %st, %st(1) /* e^x * sin(y) : e^x * cos(y) */
- movl 4(%esp), %eax /* Pointer to memory for result. */
- fstpt 12(%eax)
- fstpt (%eax)
- ret $4
-
- /* We have to reduce the argument to fsincos. */
- .align ALIGNARG(4)
-7: fldt MO(twopi) /* 2*pi : y : e^x : e^x */
- fxch /* y : 2*pi : e^x : e^x */
-8: fprem1 /* y%(2*pi) : 2*pi : e^x : e^x */
- fnstsw
- testl $0x400, %eax
- jnz 8b
- fstp %st(1) /* y%(2*pi) : e^x : e^x */
- fsincos /* cos(y) : sin(y) : e^x : e^x */
- fmulp %st, %st(3)
- fmulp %st, %st(1)
- movl 4(%esp), %eax /* Pointer to memory for result. */
- fstpt 12(%eax)
- fstpt (%eax)
- ret $4
-
- /* The real part is +-inf. We must make further differences. */
- .align ALIGNARG(4)
-1: fxam /* y : x */
- fnstsw
- movb %ah, %dl
- testb $0x01, %ah /* See above why 0x01 is usable here. */
- jne 3f
-
-
- /* The real part is +-Inf and the imaginary part is finite. */
- andl $0x245, %edx
- cmpb $0x40, %dl /* Imaginary part == 0? */
- je 4f /* Yes -> */
-
- fxch /* x : y */
- shrl $5, %edx
- fstp %st(0) /* y */ /* Drop the real part. */
- andl $16, %edx /* This puts the sign bit of the real part
- in bit 4. So we can use it to index a
- small array to select 0 or Inf. */
- fsincos /* cos(y) : sin(y) */
- fnstsw
- testl $0x0400, %eax
- jnz 5f
- fldl MOX(huge_nan_null_null,%edx,1)
- movl 4(%esp), %edx /* Pointer to memory for result. */
- fld %st
- fstpt 12(%edx)
- fstpt (%edx)
- ftst
- fnstsw
- shll $7, %eax
- andl $0x8000, %eax
- orl %eax, 8(%edx)
- fstp %st(0)
- ftst
- fnstsw
- shll $7, %eax
- andl $0x8000, %eax
- orl %eax, 20(%edx)
- fstp %st(0)
- ret $4
- /* We must reduce the argument to fsincos. */
- .align ALIGNARG(4)
-5: fldt MO(twopi)
- fxch
-6: fprem1
- fnstsw
- testl $0x400, %eax
- jnz 6b
- fstp %st(1)
- fsincos
- fldl MOX(huge_nan_null_null,%edx,1)
- movl 4(%esp), %edx /* Pointer to memory for result. */
- fld %st
- fstpt 12(%edx)
- fstpt (%edx)
- ftst
- fnstsw
- shll $7, %eax
- andl $0x8000, %eax
- orl %eax, 8(%edx)
- fstp %st(0)
- ftst
- fnstsw
- shll $7, %eax
- andl $0x8000, %eax
- orl %eax, 20(%edx)
- fstp %st(0)
- ret $4
-
- /* The real part is +-Inf and the imaginary part is +-0. So return
- +-Inf+-0i. */
- .align ALIGNARG(4)
-4: movl 4(%esp), %eax /* Pointer to memory for result. */
- fstpt 12(%eax)
- shrl $5, %edx
- fstp %st(0)
- andl $16, %edx
- fldl MOX(huge_nan_null_null,%edx,1)
- fstpt (%eax)
- ret $4
-
- /* The real part is +-Inf, the imaginary is also is not finite. */
- .align ALIGNARG(4)
-3: fstp %st(0)
- fstp %st(0) /* <empty> */
- andb $0x45, %ah
- andb $0x47, %dh
- xorb %dh, %ah
- jnz 30f
- fldl MO(infinity) /* Raise invalid exception. */
- fmull MO(zero)
- fstp %st(0)
-30: movl %edx, %eax
- shrl $5, %edx
- shll $4, %eax
- andl $16, %edx
- andl $32, %eax
- orl %eax, %edx
- movl 4(%esp), %eax /* Pointer to memory for result. */
-
- fldl MOX(huge_nan_null_null,%edx,1)
- fldl MOX(huge_nan_null_null+8,%edx,1)
- fxch
- fstpt (%eax)
- fstpt 12(%eax)
- ret $4
-
- /* The real part is NaN. */
- .align ALIGNARG(4)
-20: fldl MO(infinity) /* Raise invalid exception. */
- fmull MO(zero)
- fstp %st(0)
-2: fstp %st(0)
- fstp %st(0)
- movl 4(%esp), %eax /* Pointer to memory for result. */
- fldl MO(huge_nan_null_null+8)
- fld %st(0)
- fstpt (%eax)
- fstpt 12(%eax)
- ret $4
-
-END(__cexpl)
-weak_alias (__cexpl, cexpl)
diff --git a/sysdeps/i386/i686/hp-timing.h b/sysdeps/i386/i686/hp-timing.h
index 852f77820f..1d8684ce20 100644
--- a/sysdeps/i386/i686/hp-timing.h
+++ b/sysdeps/i386/i686/hp-timing.h
@@ -22,7 +22,7 @@
#include <string.h>
#include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* The macros defined here use the timestamp counter in i586 and up versions
of the x86 processors. They provide a very accurate way to measure the
diff --git a/sysdeps/i386/start.S b/sysdeps/i386/start.S
index 992c358c07..990f3715d5 100644
--- a/sysdeps/i386/start.S
+++ b/sysdeps/i386/start.S
@@ -1,6 +1,5 @@
/* Startup code compliant to the ELF i386 ABI.
- Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/ieee754/dbl-64/Makefile b/sysdeps/ieee754/dbl-64/Makefile
new file mode 100644
index 0000000000..1a7b31158d
--- /dev/null
+++ b/sysdeps/ieee754/dbl-64/Makefile
@@ -0,0 +1,4 @@
+ifeq ($(subdir),math)
+# branred depends on precise IEEE double rounding
+CFLAGS-branred.c = $(config-cflags-nofma)
+endif
diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c
index f936a72de7..26ffaaddc6 100644
--- a/sysdeps/ieee754/dbl-64/e_pow.c
+++ b/sysdeps/ieee754/dbl-64/e_pow.c
@@ -111,7 +111,7 @@ __ieee754_pow(double x, double y) {
if (((v.i[HIGH_HALF] & 0x7fffffff) == 0x7ff00000 && v.i[LOW_HALF] != 0)
|| (v.i[HIGH_HALF] & 0x7fffffff) > 0x7ff00000)
return y;
- if (ABS(y) > 1.0e20) return (y>0)?0:INF.x;
+ if (ABS(y) > 1.0e20) return (y>0)?0:1.0/ABS(x);
k = checkint(y);
if (k == -1)
return y < 0 ? 1.0/x : x;
diff --git a/sysdeps/ieee754/ldbl-128/k_cosl.c b/sysdeps/ieee754/ldbl-128/k_cosl.c
index 4cb9dd1f56..aa447ec1db 100644
--- a/sysdeps/ieee754/ldbl-128/k_cosl.c
+++ b/sysdeps/ieee754/ldbl-128/k_cosl.c
@@ -105,7 +105,11 @@ __kernel_cosl(long double x, long double y)
cosl(h+l) = cosl(h)cosl(l) - sinl(h)sinl(l). */
index = 0x3ffe - (tix >> 16);
hix = (tix + (0x200 << index)) & (0xfffffc00 << index);
- x = fabsl (x);
+ if (signbit (x))
+ {
+ x = -x;
+ y = -y;
+ }
switch (index)
{
case 0: index = ((45 << 10) + hix - 0x3ffe0000) >> 8; break;
diff --git a/sysdeps/ieee754/ldbl-128/k_sincosl.c b/sysdeps/ieee754/ldbl-128/k_sincosl.c
index 98c5d62780..00a21c45d1 100644
--- a/sysdeps/ieee754/ldbl-128/k_sincosl.c
+++ b/sysdeps/ieee754/ldbl-128/k_sincosl.c
@@ -132,7 +132,11 @@ __kernel_sincosl(long double x, long double y, long double *sinx, long double *c
cosl(h+l) = cosl(h)cosl(l) - sinl(h)sinl(l). */
index = 0x3ffe - (tix >> 16);
hix = (tix + (0x200 << index)) & (0xfffffc00 << index);
- x = fabsl (x);
+ if (signbit (x))
+ {
+ x = -x;
+ y = -y;
+ }
switch (index)
{
case 0: index = ((45 << 10) + hix - 0x3ffe0000) >> 8; break;
diff --git a/sysdeps/ieee754/ldbl-128/k_sinl.c b/sysdeps/ieee754/ldbl-128/k_sinl.c
index 6eaf878d94..1f0ca8c7f9 100644
--- a/sysdeps/ieee754/ldbl-128/k_sinl.c
+++ b/sysdeps/ieee754/ldbl-128/k_sinl.c
@@ -116,7 +116,7 @@ __kernel_sinl(long double x, long double y, int iy)
SET_LDOUBLE_WORDS64(h, ((u_int64_t)hix) << 32, 0);
if (iy)
- l = y - (h - x);
+ l = (ix < 0 ? -y : y) - (h - x);
else
l = x - h;
z = l * l;
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_expl.c b/sysdeps/ieee754/ldbl-128ibm/e_expl.c
index 133adc273a..5618eb3d0f 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_expl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_expl.c
@@ -1,5 +1,5 @@
/* Quad-precision floating point e^x.
- Copyright (C) 1999,2004,2006, 2008, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>
Partly based on double-precision code
@@ -74,7 +74,7 @@ static const long double C[] = {
/* Largest integer x for which e^x underflows. */
#define lomark C[1]
--709.08956571282405153382846025171462914L,
+-744.44007192138121808966388925909996033L,
/* 3x2^96 */
#define THREEp96 C[2]
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_powl.c b/sysdeps/ieee754/ldbl-128ibm/e_powl.c
index 52ce33abaa..0fd4820e4e 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_powl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_powl.c
@@ -88,8 +88,8 @@ static const long double zero = 0.0L,
one = 1.0L,
two = 2.0L,
two113 = 1.0384593717069655257060992658440192E34L,
- huge = 1.0e3000L,
- tiny = 1.0e-3000L;
+ huge = 1.0e300L,
+ tiny = 1.0e-300L;
/* 3/2 log x = 3 z + z^3 + z^3 (z^2 R(z^2))
z = (x-1)/(x+1)
diff --git a/sysdeps/ieee754/ldbl-128ibm/k_cosl.c b/sysdeps/ieee754/ldbl-128ibm/k_cosl.c
index 52414319a6..fc01374688 100644
--- a/sysdeps/ieee754/ldbl-128ibm/k_cosl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/k_cosl.c
@@ -123,7 +123,11 @@ __kernel_cosl(long double x, long double y)
index = 0x3fe - (tix >> 20);
hix = (tix + (0x200 << index)) & (0xfffffc00 << index);
- x = fabsl (x);
+ if (signbit (x))
+ {
+ x = -x;
+ y = -y;
+ }
switch (index)
{
case 0: index = ((45 << 14) + hix - 0x3fe00000) >> 12; break;
diff --git a/sysdeps/ieee754/ldbl-128ibm/k_sincosl.c b/sysdeps/ieee754/ldbl-128ibm/k_sincosl.c
index f3dd954887..98fe07d7a7 100644
--- a/sysdeps/ieee754/ldbl-128ibm/k_sincosl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/k_sincosl.c
@@ -151,7 +151,11 @@ __kernel_sincosl(long double x, long double y, long double *sinx, long double *c
index = 0x3fe - (tix >> 20);
hix = (tix + (0x2000 << index)) & (0xffffc000 << index);
- x = fabsl (x);
+ if (signbit (x))
+ {
+ x = -x;
+ y = -y;
+ }
switch (index)
{
case 0: index = ((45 << 14) + hix - 0x3fe00000) >> 12; break;
diff --git a/sysdeps/ieee754/ldbl-128ibm/k_sinl.c b/sysdeps/ieee754/ldbl-128ibm/k_sinl.c
index 484b65fc8e..94aba0b62d 100644
--- a/sysdeps/ieee754/ldbl-128ibm/k_sinl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/k_sinl.c
@@ -134,7 +134,7 @@ __kernel_sinl(long double x, long double y, int iy)
*/
SET_LDOUBLE_WORDS64(h, ((u_int64_t)hix) << 32, 0);
if (iy)
- l = y - (h - x);
+ l = (ix < 0 ? -y : y) - (h - x);
else
l = x - h;
z = l * l;
diff --git a/sysdeps/ieee754/ldbl-opt/configure b/sysdeps/ieee754/ldbl-opt/configure
index 065a3c8364..d1f3177cfd 100644
--- a/sysdeps/ieee754/ldbl-opt/configure
+++ b/sysdeps/ieee754/ldbl-opt/configure
@@ -1,19 +1,135 @@
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/ieee754/ldbl-opt/.
-{ $as_echo "$as_me:$LINENO: checking whether $CC $CFLAGS supports -mlong-double-128" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC $CFLAGS supports -mlong-double-128" >&5
$as_echo_n "checking whether $CC $CFLAGS supports -mlong-double-128... " >&6; }
-if test "${libc_cv_mlong_double_128+set}" = set; then
+if ${libc_cv_mlong_double_128+:} false; then :
$as_echo_n "(cached) " >&6
else
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mlong-double-128"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -28,39 +144,16 @@ long double foobar (long double x) { return x; }
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
libc_cv_mlong_double_128=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- libc_cv_mlong_double_128=no
+ libc_cv_mlong_double_128=no
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_mlong_double_128" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mlong_double_128" >&5
$as_echo "$libc_cv_mlong_double_128" >&6; }
if test "$libc_cv_mlong_double_128" = no; then
- { { $as_echo "$as_me:$LINENO: error: this configuration requires -mlong-double-128 support" >&5
-$as_echo "$as_me: error: this configuration requires -mlong-double-128 support" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "this configuration requires -mlong-double-128 support" "$LINENO" 5
fi
diff --git a/sysdeps/mach/_strerror.c b/sysdeps/mach/_strerror.c
index 3c0928825f..e3a5c8e3c8 100644
--- a/sysdeps/mach/_strerror.c
+++ b/sysdeps/mach/_strerror.c
@@ -21,7 +21,7 @@
#include <mach/error.h>
#include <errorlib.h>
#include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* It is critical here that we always use the `dcgettext' function for
the message translation. Since <libintl.h> only defines the macro
diff --git a/sysdeps/mach/hurd/powerpc/register-dump.h b/sysdeps/mach/hurd/powerpc/register-dump.h
index 258579727e..80d545e488 100644
--- a/sysdeps/mach/hurd/powerpc/register-dump.h
+++ b/sysdeps/mach/hurd/powerpc/register-dump.h
@@ -17,7 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* This prints out the information in the following form: */
static const char dumpform[] = "\
diff --git a/sysdeps/mach/hurd/sethostid.c b/sysdeps/mach/hurd/sethostid.c
index d1ff1b0f5b..7fadf6aa85 100644
--- a/sysdeps/mach/hurd/sethostid.c
+++ b/sysdeps/mach/hurd/sethostid.c
@@ -18,7 +18,7 @@
#include <unistd.h>
#include <hurd.h>
#include "hurdhost.h"
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* Set the current machine's Internet number to ID.
This call is restricted to the super-user. */
diff --git a/sysdeps/mach/hurd/xmknodat.c b/sysdeps/mach/hurd/xmknodat.c
index a37b918822..acd1a8c683 100644
--- a/sysdeps/mach/hurd/xmknodat.c
+++ b/sysdeps/mach/hurd/xmknodat.c
@@ -23,7 +23,7 @@
#include <hurd/fd.h>
#include <hurd/paths.h>
#include <fcntl.h>
-#include "stdio-common/_itoa.h"
+#include <_itoa.h>
#include <string.h>
#include <sys/types.h>
diff --git a/sysdeps/mach/xpg-strerror.c b/sysdeps/mach/xpg-strerror.c
index 997c5b6a3f..421d75803d 100644
--- a/sysdeps/mach/xpg-strerror.c
+++ b/sysdeps/mach/xpg-strerror.c
@@ -23,7 +23,7 @@
#include <mach/error.h>
#include <errorlib.h>
#include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* It is critical here that we always use the `dcgettext' function for
the message translation. Since <libintl.h> only defines the macro
diff --git a/sysdeps/powerpc/configure b/sysdeps/powerpc/configure
index b347754f35..c3ad67f012 100644
--- a/sysdeps/powerpc/configure
+++ b/sysdeps/powerpc/configure
@@ -1,10 +1,92 @@
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/powerpc.
# Accept binutils which knows about ".machine".
-{ $as_echo "$as_me:$LINENO: checking for .machine support" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for .machine support" >&5
$as_echo_n "checking for .machine support... " >&6; }
-if test "${libc_cv_ppc_machine+set}" = set; then
+if ${libc_cv_ppc_machine+:} false; then :
$as_echo_n "(cached) " >&6
else
cat > conftest.s <<\EOF
@@ -12,27 +94,22 @@ else
blr
EOF
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
libc_cv_ppc_machine=yes
else
libc_cv_ppc_machine=no
fi
rm -f conftest*
fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_ppc_machine" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ppc_machine" >&5
$as_echo "$libc_cv_ppc_machine" >&6; }
if test $libc_cv_ppc_machine != yes; then
- { { $as_echo "$as_me:$LINENO: error:
-*** A binutils version which can handle
-*** .machine \"altivec\"
-*** is needed." >&5
-$as_echo "$as_me: error:
+ as_fn_error $? "
*** A binutils version which can handle
*** .machine \"altivec\"
-*** is needed." >&2;}
- { (exit 1); exit 1; }; }
+*** is needed." "$LINENO" 5
fi
diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps
index 4b1cff0765..1ab3d4ad4f 100644
--- a/sysdeps/powerpc/fpu/libm-test-ulps
+++ b/sysdeps/powerpc/fpu/libm-test-ulps
@@ -521,6 +521,11 @@ ldouble: 2
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
+Test "Imaginary part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
float: 1
ifloat: 1
@@ -529,6 +534,41 @@ ldouble: 2
Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: cexp (1440 + 0x1p-1074 i) == inf + 1.196295853897226111293303155636183216483e302 i plus overflow exception":
+double: 1
+idouble: 1
+Test "Real part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i":
+double: 1
+idouble: 1
+Test "Real part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i":
+float: 2
+ifloat: 2
# clog
Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
@@ -544,6 +584,15 @@ ldouble: 2
Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 709.8942846690411016323109979483151967689 + 0.4636476090008061606231772164674799632783 i":
+double: 1
+idouble: 1
+Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i":
+double: 1
+idouble: 1
+Test "Real part of: clog (0x1p-147 + 0x1p-147 i) == -101.5460619520319878296245057936228672231 + pi/4 i":
+float: 1
+ifloat: 1
# clog10
Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
@@ -634,6 +683,51 @@ float: 2
ifloat: 2
ildouble: 3
ldouble: 3
+Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i) == 38.53183941910362389414093724045094697423 + 1.276276851248440096917018665609900318458e-39 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 308.4052305577487344482591243175787477115 + pi/4*log10(e) i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 308.3031705664207720674749211936626341569 + 0.2013595981366865903254995612594728746470 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + pi/4*log10(e) i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i) == -44.10089436477324509881274807713822842154 + pi/4*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i) == -44.70295435610120748924022586658721447508 + pi/4*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
double: 1
float: 1
@@ -2046,25 +2140,33 @@ ildouble: 2
ldouble: 2
Function: Real part of "cexp":
+double: 2
float: 1
+idouble: 2
ifloat: 1
ildouble: 2
ldouble: 2
Function: Imaginary part of "cexp":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 2
+ldouble: 2
Function: Real part of "clog":
+double: 1
float: 2
+idouble: 1
ifloat: 2
ildouble: 2
ldouble: 2
Function: Imaginary part of "clog":
+double: 1
float: 3
+idouble: 1
ifloat: 3
ildouble: 1
ldouble: 1
diff --git a/sysdeps/powerpc/powerpc32/configure b/sysdeps/powerpc/powerpc32/configure
index da8ec0b87c..86ecfdcf4a 100644
--- a/sysdeps/powerpc/powerpc32/configure
+++ b/sysdeps/powerpc/powerpc32/configure
@@ -1,10 +1,92 @@
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/powerpc/powerpc32.
# See whether gas has R_PPC_REL16 relocs.
-{ $as_echo "$as_me:$LINENO: checking for R_PPC_REL16 gas support" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for R_PPC_REL16 gas support" >&5
$as_echo_n "checking for R_PPC_REL16 gas support... " >&6; }
-if test "${libc_cv_ppc_rel16+set}" = set; then
+if ${libc_cv_ppc_rel16+:} false; then :
$as_echo_n "(cached) " >&6
else
cat > conftest.s <<\EOF
@@ -12,50 +94,46 @@ else
addis 11,30,_GLOBAL_OFFSET_TABLE_-.@ha
EOF
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
libc_cv_ppc_rel16=yes
else
libc_cv_ppc_rel16=no
fi
rm -f conftest*
fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_ppc_rel16" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ppc_rel16" >&5
$as_echo "$libc_cv_ppc_rel16" >&6; }
if test $libc_cv_ppc_rel16 = no; then
- { { $as_echo "$as_me:$LINENO: error: R_PPC_REL16 is not supported. Binutils is too old." >&5
-$as_echo "$as_me: error: R_PPC_REL16 is not supported. Binutils is too old." >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "R_PPC_REL16 is not supported. Binutils is too old." "$LINENO" 5
fi
# See whether GCC uses -msecure-plt.
-{ $as_echo "$as_me:$LINENO: checking for -msecure-plt by default" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -msecure-plt by default" >&5
$as_echo_n "checking for -msecure-plt by default... " >&6; }
-if test "${libc_cv_ppc_secure_plt+set}" = set; then
+if ${libc_cv_ppc_secure_plt+:} false; then :
$as_echo_n "(cached) " >&6
else
echo 'int foo (void) { extern int bar; return bar; }' > conftest.c
libc_cv_ppc_secure_plt=no
if { ac_try='${CC-cc} -S $CFLAGS conftest.c -fpic -o conftest.s 1>&5'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
if grep '_GLOBAL_OFFSET_TABLE_-.*@ha' conftest.s > /dev/null 2>&1; then
libc_cv_ppc_secure_plt=yes
fi
fi
rm -rf conftest*
fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_ppc_secure_plt" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ppc_secure_plt" >&5
$as_echo "$libc_cv_ppc_secure_plt" >&6; }
if test $libc_cv_ppc_secure_plt = yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_PPC_SECURE_PLT 1
-_ACEOF
+ $as_echo "#define HAVE_PPC_SECURE_PLT 1" >>confdefs.h
fi
diff --git a/sysdeps/powerpc/powerpc32/dl-machine.c b/sysdeps/powerpc/powerpc32/dl-machine.c
index 9ad6bbbc0b..e535480133 100644
--- a/sysdeps/powerpc/powerpc32/dl-machine.c
+++ b/sysdeps/powerpc/powerpc32/dl-machine.c
@@ -23,7 +23,7 @@
#include <ldsodefs.h>
#include <elf/dynamic-link.h>
#include <dl-machine.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* The value __cache_line_size is defined in dl-sysdep.c and is initialised
by _dl_sysdep_start via DL_PLATFORM_INIT. */
diff --git a/sysdeps/powerpc/powerpc32/power4/hp-timing.h b/sysdeps/powerpc/powerpc32/power4/hp-timing.h
index 8370f72691..a80168a7c9 100644
--- a/sysdeps/powerpc/powerpc32/power4/hp-timing.h
+++ b/sysdeps/powerpc/powerpc32/power4/hp-timing.h
@@ -22,7 +22,7 @@
#include <string.h>
#include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <atomic.h>
/* The macros defined here use the powerpc 64-bit time base register.
diff --git a/sysdeps/powerpc/powerpc32/register-dump.h b/sysdeps/powerpc/powerpc32/register-dump.h
index d9b520e5e7..2936de240b 100644
--- a/sysdeps/powerpc/powerpc32/register-dump.h
+++ b/sysdeps/powerpc/powerpc32/register-dump.h
@@ -17,7 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* This prints out the information in the following form: */
static const char dumpform[] = "\
diff --git a/sysdeps/powerpc/powerpc64/configure b/sysdeps/powerpc/powerpc64/configure
index a9b6722c11..7cff76141b 100644
--- a/sysdeps/powerpc/powerpc64/configure
+++ b/sysdeps/powerpc/powerpc64/configure
@@ -1,21 +1,103 @@
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/powerpc/powerpc64.
# The Aix ld uses global .symbol_names instead of symbol_names
# and unfortunately early Linux PPC64 linkers use it as well.
-{ $as_echo "$as_me:$LINENO: checking for support for omitting dot symbols" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for support for omitting dot symbols" >&5
$as_echo_n "checking for support for omitting dot symbols... " >&6; }
-if test "${libc_cv_omit_dot_syms+set}" = set; then
+if ${libc_cv_omit_dot_syms+:} false; then :
$as_echo_n "(cached) " >&6
else
libc_cv_omit_dot_syms=no
echo 'void foo (void) {}' > conftest.c
if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c -o conftest.s 1>&5'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
if grep -w '\.foo' conftest.s > /dev/null; then
:
else
@@ -25,28 +107,26 @@ fi
rm -f conftest.c conftest.s
fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_omit_dot_syms" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_omit_dot_syms" >&5
$as_echo "$libc_cv_omit_dot_syms" >&6; }
if test x$libc_cv_omit_dot_syms != xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_ASM_GLOBAL_DOT_NAME 1
-_ACEOF
+ $as_echo "#define HAVE_ASM_GLOBAL_DOT_NAME 1" >>confdefs.h
fi
-{ $as_echo "$as_me:$LINENO: checking for linker support for overlapping .opd entries" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker support for overlapping .opd entries" >&5
$as_echo_n "checking for linker support for overlapping .opd entries... " >&6; }
-if test "${libc_cv_overlapping_opd+set}" = set; then
+if ${libc_cv_overlapping_opd+:} false; then :
$as_echo_n "(cached) " >&6
else
libc_cv_overlapping_opd=no
echo 'void foo (void) {}' > conftest.c
if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c -o conftest.s 1>&5'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
if grep '\.TOC\.@tocbase' conftest.s > /dev/null; then
if grep '\.TOC\.@tocbase[ ]*,[ ]*0' conftest.s > /dev/null; then
:
@@ -58,11 +138,9 @@ fi
rm -f conftest.c conftest.s
fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_overlapping_opd" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_overlapping_opd" >&5
$as_echo "$libc_cv_overlapping_opd" >&6; }
if test x$libc_cv_overlapping_opd = xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define USE_PPC64_OVERLAPPING_OPD 1
-_ACEOF
+ $as_echo "#define USE_PPC64_OVERLAPPING_OPD 1" >>confdefs.h
fi
diff --git a/sysdeps/powerpc/powerpc64/dl-machine.c b/sysdeps/powerpc/powerpc64/dl-machine.c
index 6a8e68f39e..8e216ed87c 100644
--- a/sysdeps/powerpc/powerpc64/dl-machine.c
+++ b/sysdeps/powerpc/powerpc64/dl-machine.c
@@ -19,7 +19,7 @@
#include <string.h>
#include <unistd.h>
#include <ldsodefs.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <dl-machine.h>
void
diff --git a/sysdeps/powerpc/powerpc64/hp-timing.h b/sysdeps/powerpc/powerpc64/hp-timing.h
index b4cf2a42cb..dc10bc4f65 100644
--- a/sysdeps/powerpc/powerpc64/hp-timing.h
+++ b/sysdeps/powerpc/powerpc64/hp-timing.h
@@ -22,7 +22,7 @@
#include <string.h>
#include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <atomic.h>
/* The macros defined here use the powerpc 64-bit time base register.
diff --git a/sysdeps/powerpc/powerpc64/register-dump.h b/sysdeps/powerpc/powerpc64/register-dump.h
index e301b0fe61..917886db2f 100644
--- a/sysdeps/powerpc/powerpc64/register-dump.h
+++ b/sysdeps/powerpc/powerpc64/register-dump.h
@@ -17,7 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* This prints out the information in the following form: */
static const char dumpform[] = "\
diff --git a/sysdeps/sparc/fpu/fenv_private.h b/sysdeps/sparc/fpu/fenv_private.h
new file mode 100644
index 0000000000..a6e8e95a55
--- /dev/null
+++ b/sysdeps/sparc/fpu/fenv_private.h
@@ -0,0 +1,106 @@
+#ifndef FENV_PRIVATE_H
+#define FENV_PRIVATE_H 1
+
+#include <fenv.h>
+
+static __always_inline void
+libc_feholdexcept (fenv_t *e)
+{
+ fenv_t etmp;
+ __fenv_stfsr(etmp);
+ *(e) = etmp;
+ etmp = etmp & ~((0x1f << 23) | FE_ALL_EXCEPT);
+ __fenv_ldfsr(etmp);
+}
+
+static __always_inline void
+libc_feholdexcept_setround (fenv_t *e, int r)
+{
+ fenv_t etmp;
+ __fenv_stfsr(etmp);
+ *(e) = etmp;
+ etmp = etmp & ~((0x1f << 23) | FE_ALL_EXCEPT);
+ etmp = (etmp & ~__FE_ROUND_MASK) | (r);
+ __fenv_ldfsr(etmp);
+}
+
+static __always_inline int
+libc_fetestexcept (int e)
+{
+ fenv_t etmp;
+ __fenv_stfsr(etmp);
+ return etmp & (e) & FE_ALL_EXCEPT;
+}
+
+static __always_inline void
+libc_fesetenv (fenv_t *e)
+{
+ __fenv_ldfsr(*e);
+}
+
+static __always_inline int
+libc_feupdateenv_test (fenv_t *e, int ex)
+{
+ fenv_t etmp;
+
+ __fenv_stfsr(etmp);
+ etmp &= FE_ALL_EXCEPT;
+
+ __fenv_ldfsr(*e);
+
+ __feraiseexcept (etmp);
+
+ return etmp & ex;
+}
+
+static __always_inline void
+libc_feupdateenv (fenv_t *e)
+{
+ libc_feupdateenv_test (e, 0);
+}
+
+static __always_inline void
+libc_feholdsetround (fenv_t *e, int r)
+{
+ fenv_t etmp;
+ __fenv_stfsr(etmp);
+ *(e) = etmp;
+ etmp = (etmp & ~__FE_ROUND_MASK) | (r);
+ __fenv_ldfsr(etmp);
+}
+
+static __always_inline void
+libc_feresetround (fenv_t *e)
+{
+ fenv_t etmp;
+ __fenv_stfsr(etmp);
+ etmp = (etmp & ~__FE_ROUND_MASK) | (*e & __FE_ROUND_MASK);
+ __fenv_ldfsr(etmp);
+}
+
+#define libc_feholdexceptf libc_feholdexcept
+#define libc_feholdexcept_setroundf libc_feholdexcept_setround
+#define libc_fetestexceptf libc_fetestexcept
+#define libc_fesetenvf libc_fesetenv
+#define libc_feupdateenv_testf libc_feupdateenv_test
+#define libc_feupdateenvf libc_feupdateenv
+#define libc_feholdsetroundf libc_feholdsetround
+#define libc_feresetroundf libc_feresetround
+#define libc_feholdexcept libc_feholdexcept
+#define libc_feholdexcept_setround libc_feholdexcept_setround
+#define libc_fetestexcept libc_fetestexcept
+#define libc_fesetenv libc_fesetenv
+#define libc_feupdateenv_test libc_feupdateenv_test
+#define libc_feupdateenv libc_feupdateenv
+#define libc_feholdsetround libc_feholdsetround
+#define libc_feresetround libc_feresetround
+#define libc_feholdexceptl libc_feholdexcept
+#define libc_feholdexcept_setroundl libc_feholdexcept_setround
+#define libc_fetestexceptl libc_fetestexcept
+#define libc_fesetenvl libc_fesetenv
+#define libc_feupdateenv_testl libc_feupdateenv_test
+#define libc_feupdateenvl libc_feupdateenv
+#define libc_feholdsetroundl libc_feholdsetround
+#define libc_feresetroundl libc_feresetround
+
+#endif /* FENV_PRIVATE_H */
diff --git a/sysdeps/sparc/fpu/libm-test-ulps b/sysdeps/sparc/fpu/libm-test-ulps
index 57e4f61b85..60a53aa43f 100644
--- a/sysdeps/sparc/fpu/libm-test-ulps
+++ b/sysdeps/sparc/fpu/libm-test-ulps
@@ -525,6 +525,9 @@ float: 1
ifloat: 1
# cexp
+Test "Imaginary part of: cexp (-10000 + 0x1p16383 i) == 1.045876464564882298442774542991176546722e-4343 + 4.421154026488516836023811173959413420548e-4344 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
ildouble: 1
ldouble: 1
@@ -533,12 +536,55 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Imaginary part of: cexp (-720 + 0.75 i) == 1.486960657116368433685753325516638551722e-313 + 1.385247284245720590980701226843815229385e-313 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i":
+double: 1
+idouble: 1
Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
float: 1
ifloat: 1
Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: cexp (1440 + 0x1p-1074 i) == inf + 1.196295853897226111293303155636183216483e302 i plus overflow exception":
+double: 1
+idouble: 1
+Test "Imaginary part of: cexp (22730 + 0x1p-16434 i) == inf + 2.435706297811211974162115164702304105374e4924 i plus overflow exception":
+ildouble: 1
+ldouble: 1
+Test "Real part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
+double: 1
+idouble: 1
+Test "Real part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i":
+double: 1
+idouble: 1
+Test "Real part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i":
+float: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
# clog
Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
@@ -546,6 +592,15 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Real part of: clog (0x1.fp+16383 + 0x1.fp+16383 i) == 11356.83823118610934184548269774874545400 + pi/4 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i":
+double: 1
+idouble: 1
+Test "Real part of: clog (0x1p-147 + 0x1p-147 i) == -101.5460619520319878296245057936228672231 + pi/4 i":
+float: 1
+ifloat: 1
# clog10
Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
@@ -615,6 +670,42 @@ ifloat: 1
Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i) == 38.53183941910362389414093724045094697423 + 1.276276851248440096917018665609900318458e-39 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 308.4052305577487344482591243175787477115 + pi/4*log10(e) i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1.fp+16383 + 0x1.fp+16383 i) == 4932.212175672014259683102930239951947672 + pi/4*log10(e) i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1.fp+16383 + 0x1p+16383 i) == 4932.112944269463028900262609694408579449 + 0.2069271710841128115912940666587802677383 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + pi/4*log10(e) i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i) == -44.10089436477324509881274807713822842154 + pi/4*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i) == -44.70295435610120748924022586658721447508 + pi/4*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
double: 1
float: 1
@@ -640,8 +731,6 @@ ifloat: 1
Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
idouble: 1
-ildouble: 1
-ldouble: 1
Test "cos (M_PI_6l * 4.0) == -0.5":
double: 2
float: 1
@@ -654,8 +743,6 @@ ldouble: 1
Test "cos_downward (1) == 0.5403023058681397174009366074429766037323":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "cos_downward (10) == -0.8390715290764524522588639478240648345199":
ildouble: 1
ldouble: 1
@@ -672,8 +759,6 @@ ldouble: 1
Test "cos_downward (4) == -0.6536436208636119146391681830977503814241":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "cos_downward (5) == 0.2836621854632262644666391715135573083344":
float: 1
ifloat: 1
@@ -699,9 +784,6 @@ float: 1
ifloat: 1
# cos_towardzero
-Test "cos_towardzero (1) == 0.5403023058681397174009366074429766037323":
-ildouble: 1
-ldouble: 1
Test "cos_towardzero (10) == -0.8390715290764524522588639478240648345199":
ildouble: 1
ldouble: 1
@@ -715,9 +797,6 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "cos_towardzero (4) == -0.6536436208636119146391681830977503814241":
-ildouble: 1
-ldouble: 1
Test "cos_towardzero (5) == 0.2836621854632262644666391715135573083344":
float: 1
ifloat: 1
@@ -738,9 +817,15 @@ ildouble: 2
ldouble: 2
# cos_upward
+Test "cos_upward (1) == 0.5403023058681397174009366074429766037323":
+ildouble: 1
+ldouble: 1
Test "cos_upward (10) == -0.8390715290764524522588639478240648345199":
float: 1
ifloat: 1
+Test "cos_upward (4) == -0.6536436208636119146391681830977503814241":
+ildouble: 1
+ldouble: 1
Test "cos_upward (6) == 0.9601702866503660205456522979229244054519":
float: 1
ifloat: 1
@@ -818,9 +903,6 @@ ifloat: 4
ildouble: 4
ldouble: 4
Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
-ildouble: 2
-ldouble: 2
-Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
ildouble: 1
ldouble: 1
Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
@@ -828,8 +910,8 @@ double: 2
float: 3
idouble: 2
ifloat: 3
-ildouble: 10
-ldouble: 10
+ildouble: 11
+ldouble: 11
Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
ildouble: 2
ldouble: 2
@@ -838,8 +920,8 @@ double: 1
float: 4
idouble: 1
ifloat: 4
-ildouble: 3
-ldouble: 3
+ildouble: 2
+ldouble: 2
Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
float: 2
ifloat: 2
@@ -946,6 +1028,11 @@ ifloat: 1
Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
+ildouble: 1
+ldouble: 1
# erf
Test "erf (1.25) == 0.922900128256458230136523481197281140":
@@ -994,9 +1081,9 @@ ildouble: 1
ldouble: 1
# exp2
-Test "exp2 (10) == 1024":
-ildouble: 2
-ldouble: 2
+Test "exp2 (100.5) == 1.792728671193156477399422023278661496394e+30":
+ildouble: 1
+ldouble: 1
# exp_downward
Test "exp_downward (2) == e^2":
@@ -1367,15 +1454,7 @@ ifloat: 1
ildouble: 1
ldouble: 1
-# sin
-Test "sin (0x1p1023) == 0.5631277798508840134529434079444683477104":
-ildouble: 1
-ldouble: 1
-
# sin_downward
-Test "sin_downward (1) == 0.8414709848078965066525023216302989996226":
-ildouble: 1
-ldouble: 1
Test "sin_downward (10) == -0.5440211108893698134047476618513772816836":
float: 1
ifloat: 1
@@ -1398,9 +1477,10 @@ ldouble: 1
Test "sin_downward (6) == -0.2794154981989258728115554466118947596280":
float: 1
ifloat: 1
+Test "sin_downward (8) == 0.9893582466233817778081235982452886721164":
ildouble: 1
ldouble: 1
-Test "sin_downward (8) == 0.9893582466233817778081235982452886721164":
+Test "sin_downward (9) == 0.4121184852417565697562725663524351793439":
ildouble: 1
ldouble: 1
@@ -1408,17 +1488,9 @@ ldouble: 1
Test "sin_tonearest (1) == 0.8414709848078965066525023216302989996226":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "sin_tonearest (3) == 0.1411200080598672221007448028081102798469":
ildouble: 1
ldouble: 1
-Test "sin_tonearest (6) == -0.2794154981989258728115554466118947596280":
-ildouble: 1
-ldouble: 1
-Test "sin_tonearest (9) == 0.4121184852417565697562725663524351793439":
-ildouble: 1
-ldouble: 1
# sin_towardzero
Test "sin_towardzero (1) == 0.8414709848078965066525023216302989996226":
@@ -1436,22 +1508,21 @@ ldouble: 1
Test "sin_towardzero (4) == -0.7568024953079282513726390945118290941359":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "sin_towardzero (5) == -0.9589242746631384688931544061559939733525":
float: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "sin_towardzero (6) == -0.2794154981989258728115554466118947596280":
-ildouble: 1
-ldouble: 1
Test "sin_towardzero (8) == 0.9893582466233817778081235982452886721164":
ildouble: 1
ldouble: 1
Test "sin_towardzero (9) == 0.4121184852417565697562725663524351793439":
float: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
+ildouble: 1
+ldouble: 1
# sin_upward
Test "sin_upward (1) == 0.8414709848078965066525023216302989996226":
@@ -1471,6 +1542,7 @@ ldouble: 1
Test "sin_upward (4) == -0.7568024953079282513726390945118290941359":
float: 1
ifloat: 1
+Test "sin_upward (6) == -0.2794154981989258728115554466118947596280":
ildouble: 1
ldouble: 1
Test "sin_upward (7) == 0.6569865987187890903969990915936351779369":
@@ -1479,25 +1551,16 @@ ldouble: 1
Test "sin_upward (9) == 0.4121184852417565697562725663524351793439":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
# sincos
-Test "sincos (0x1p1023, &sin_res, &cos_res) puts 0.5631277798508840134529434079444683477104 in sin_res":
-ildouble: 1
-ldouble: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
idouble: 1
-ildouble: 1
-ldouble: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
float: 1
ifloat: 1
@@ -1969,25 +2032,33 @@ ildouble: 1
ldouble: 1
Function: Real part of "cexp":
+double: 2
float: 1
+idouble: 2
ifloat: 1
ildouble: 1
ldouble: 1
Function: Imaginary part of "cexp":
-float: 1
-ifloat: 1
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
ildouble: 1
ldouble: 1
Function: Real part of "clog":
+double: 1
float: 1
+idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
Function: Real part of "clog10":
+double: 1
float: 1
+idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
@@ -2055,8 +2126,8 @@ double: 2
float: 4
idouble: 2
ifloat: 4
-ildouble: 10
-ldouble: 10
+ildouble: 11
+ldouble: 11
Function: Imaginary part of "cpow":
double: 2
@@ -2147,8 +2218,8 @@ ildouble: 1
ldouble: 1
Function: "exp2":
-ildouble: 2
-ldouble: 2
+ildouble: 1
+ldouble: 1
Function: "exp_downward":
float: 1
@@ -2248,10 +2319,6 @@ ifloat: 1
ildouble: 1
ldouble: 1
-Function: "sin":
-ildouble: 1
-ldouble: 1
-
Function: "sin_downward":
float: 1
ifloat: 1
@@ -2267,8 +2334,8 @@ ldouble: 1
Function: "sin_towardzero":
float: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
+ildouble: 1
+ldouble: 1
Function: "sin_upward":
float: 2
diff --git a/sysdeps/sparc/fpu/math_private.h b/sysdeps/sparc/fpu/math_private.h
index 05ef623644..27946cec7b 100644
--- a/sysdeps/sparc/fpu/math_private.h
+++ b/sysdeps/sparc/fpu/math_private.h
@@ -1,68 +1,7 @@
#ifndef SPARC_MATH_PRIVATE_H
#define SPARC_MATH_PRIVATE_H 1
+#include "fenv_private.h"
#include_next <math_private.h>
-#include <fenv.h>
-
-#undef libc_feholdexcept
-#define libc_feholdexcept(e) \
- do { \
- fenv_t etmp; \
- __fenv_stfsr(etmp); \
- *(e) = etmp; \
- etmp = etmp & ~((0x1f << 23) | FE_ALL_EXCEPT); \
- __fenv_ldfsr(etmp); \
- } while (0)
-#undef libc_feholdexceptf
-#define libc_feholdexceptf(e) libc_feholdexcept (e)
-#undef libc_feholdexceptl
-#define libc_feholdexceptl(e) libc_feholdexcept (e)
-
-#undef libc_feholdexcept_setround
-#define libc_feholdexcept_setround(e, r) \
- do { \
- fenv_t etmp; \
- __fenv_stfsr(etmp); \
- *(e) = etmp; \
- etmp = etmp & ~((0x1f << 23) | FE_ALL_EXCEPT); \
- etmp = (etmp & ~__FE_ROUND_MASK) | (r); \
- __fenv_ldfsr(etmp); \
- } while (0)
-#undef libc_feholdexcept_setroundf
-#define libc_feholdexcept_setroundf(e, r) libc_feholdexcept_setround (e, r)
-#undef libc_feholdexcept_setroundl
-#define libc_feholdexcept_setroundl(e, r) libc_feholdexcept_setround (e, r)
-
-#undef libc_fetestexcept
-#define libc_fetestexcept(e) \
- ({ \
- fenv_t etmp; \
- __fenv_stfsr(etmp); \
- etmp & (e) & FE_ALL_EXCEPT; })
-#undef libc_fetestexceptf
-#define libc_fetestexceptf(e) libc_fetestexcept (e)
-#undef libc_fetestexceptl
-#define libc_fetestexceptl(e) libc_fetestexcept (e)
-
-#undef libc_fesetenv
-#define libc_fesetenv(e) \
- __fenv_ldfsr(*e)
-#undef libc_fesetenvf
-#define libc_fesetenvf(e) libc_fesetenv (e)
-#undef libc_fesetenvl
-#define libc_fesetenvl(e) libc_fesetenv (e)
-
-#undef libc_feupdateenv
-#define libc_feupdateenv(e) \
- do { \
- fenv_t etmp; \
- __fenv_stfsr(etmp); \
- __fenv_ldfsr(*e); \
- __feraiseexcept (etmp & FE_ALL_EXCEPT); \
- } while (0)
-#undef libc_feupdateenvf
-#define libc_feupdateenvf(e) libc_feupdateenv (e)
-#undef libc_feupdateenvl
-#define libc_feupdateenvl(e) libc_feupdateenv (e)
#endif /* SPARC_MATH_PRIVATE_H */
diff --git a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
index b90bb84152..d0f896da5c 100644
--- a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
+++ b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
@@ -22,7 +22,7 @@
#include <string.h>
#include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#define HP_TIMING_AVAIL (1)
#define HP_TIMING_INLINE (1)
diff --git a/sysdeps/sparc/sparc64/hp-timing.h b/sysdeps/sparc/sparc64/hp-timing.h
index b68f653fb8..684b846f55 100644
--- a/sysdeps/sparc/sparc64/hp-timing.h
+++ b/sysdeps/sparc/sparc64/hp-timing.h
@@ -22,7 +22,7 @@
#include <string.h>
#include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#define HP_TIMING_AVAIL (1)
#define HP_TIMING_INLINE (1)
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index 33821c0bb6..31031613d3 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -393,7 +393,7 @@ case "$prefix" in
# and libc_cv_localedir.
test -n "$libc_cv_slibdir" || \
case $machine in
- sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
+ sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64)
libc_cv_slibdir="/lib64"
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
diff --git a/sysdeps/unix/sysv/linux/configure.in b/sysdeps/unix/sysv/linux/configure.in
index 59a13112b2..556ca84517 100644
--- a/sysdeps/unix/sysv/linux/configure.in
+++ b/sysdeps/unix/sysv/linux/configure.in
@@ -132,7 +132,7 @@ case "$prefix" in
# and libc_cv_localedir.
test -n "$libc_cv_slibdir" || \
case $machine in
- sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
+ sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64)
libc_cv_slibdir="/lib64"
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
diff --git a/sysdeps/unix/sysv/linux/fd_to_filename.h b/sysdeps/unix/sysv/linux/fd_to_filename.h
index feefc2b78e..ee939af159 100644
--- a/sysdeps/unix/sysv/linux/fd_to_filename.h
+++ b/sysdeps/unix/sysv/linux/fd_to_filename.h
@@ -19,7 +19,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
static inline const char *
fd_to_filename (int fd)
diff --git a/sysdeps/unix/sysv/linux/futimes.c b/sysdeps/unix/sysv/linux/futimes.c
index cd76f6ffba..913bd105fc 100644
--- a/sysdeps/unix/sysv/linux/futimes.c
+++ b/sysdeps/unix/sysv/linux/futimes.c
@@ -22,7 +22,7 @@
#include <time.h>
#include <utime.h>
#include <sys/time.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <fcntl.h>
#include <kernel-features.h>
diff --git a/sysdeps/unix/sysv/linux/i386/register-dump.h b/sysdeps/unix/sysv/linux/i386/register-dump.h
index d2c5c3fcaf..7f54f67430 100644
--- a/sysdeps/unix/sysv/linux/i386/register-dump.h
+++ b/sysdeps/unix/sysv/linux/i386/register-dump.h
@@ -18,7 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* We will print the register dump in this format:
diff --git a/sysdeps/unix/sysv/linux/powerpc/configure b/sysdeps/unix/sysv/linux/powerpc/configure
index df2813d9cd..802b371601 100644
--- a/sysdeps/unix/sysv/linux/powerpc/configure
+++ b/sysdeps/unix/sysv/linux/powerpc/configure
@@ -1,19 +1,135 @@
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/unix/sysv/linux/powerpc/.
-{ $as_echo "$as_me:$LINENO: checking whether $CC $CFLAGS -mlong-double-128 uses IBM extended format" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC $CFLAGS -mlong-double-128 uses IBM extended format" >&5
$as_echo_n "checking whether $CC $CFLAGS -mlong-double-128 uses IBM extended format... " >&6; }
-if test "${libc_cv_mlong_double_128ibm+set}" = set; then
+if ${libc_cv_mlong_double_128ibm+:} false; then :
$as_echo_n "(cached) " >&6
else
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mlong-double-128"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <float.h>
int
@@ -28,51 +144,26 @@ long double foobar (long double x) { return x; }
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
libc_cv_mlong_double_128ibm=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- libc_cv_mlong_double_128ibm=no
+ libc_cv_mlong_double_128ibm=no
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_mlong_double_128ibm" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mlong_double_128ibm" >&5
$as_echo "$libc_cv_mlong_double_128ibm" >&6; }
if test "$libc_cv_mlong_double_128ibm" = no; then
- { $as_echo "$as_me:$LINENO: checking whether $CC $CFLAGS supports -mabi=ibmlongdouble" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC $CFLAGS supports -mabi=ibmlongdouble" >&5
$as_echo_n "checking whether $CC $CFLAGS supports -mabi=ibmlongdouble... " >&6; }
-if test "${libc_cv_mabi_ibmlongdouble+set}" = set; then
+if ${libc_cv_mabi_ibmlongdouble+:} false; then :
$as_echo_n "(cached) " >&6
else
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mlong-double-128 -mabi=ibmlongdouble"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <float.h>
int
@@ -87,43 +178,20 @@ long double foobar (long double x) { return x; }
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
libc_cv_mabi_ibmlongdouble=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- libc_cv_mabi_ibmlongdouble=no
+ libc_cv_mabi_ibmlongdouble=no
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_mabi_ibmlongdouble" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mabi_ibmlongdouble" >&5
$as_echo "$libc_cv_mabi_ibmlongdouble" >&6; }
if test "$libc_cv_mabi_ibmlongdouble" = yes; then
CFLAGS="$CFLAGS -mabi=ibmlongdouble"
else
- { { $as_echo "$as_me:$LINENO: error: this configuration requires -mlong-double-128 IBM extended format support" >&5
-$as_echo "$as_me: error: this configuration requires -mlong-double-128 IBM extended format support" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "this configuration requires -mlong-double-128 IBM extended format support" "$LINENO" 5
fi
fi
diff --git a/sysdeps/unix/sysv/linux/ptsname.c b/sysdeps/unix/sysv/linux/ptsname.c
index 41edd8f8fe..fb097698fb 100644
--- a/sysdeps/unix/sysv/linux/ptsname.c
+++ b/sysdeps/unix/sysv/linux/ptsname.c
@@ -26,7 +26,7 @@
#include <termios.h>
#include <unistd.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* Check if DEV corresponds to a master pseudo terminal device. */
#define MASTER_P(Dev) \
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h b/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h
index 0c3b83c24b..1f1a85983e 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h
@@ -18,7 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* We will print the register dump in this format:
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h b/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h
index 0cf89f14ca..671481df75 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h
@@ -18,7 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* We will print the register dump in this format:
diff --git a/sysdeps/unix/sysv/linux/sh/sh3/register-dump.h b/sysdeps/unix/sysv/linux/sh/sh3/register-dump.h
index 9562882eda..510863e7bf 100644
--- a/sysdeps/unix/sysv/linux/sh/sh3/register-dump.h
+++ b/sysdeps/unix/sysv/linux/sh/sh3/register-dump.h
@@ -17,7 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* We will print the register dump in this format:
diff --git a/sysdeps/unix/sysv/linux/sh/sh4/register-dump.h b/sysdeps/unix/sysv/linux/sh/sh4/register-dump.h
index d31ca1f914..f05447c373 100644
--- a/sysdeps/unix/sysv/linux/sh/sh4/register-dump.h
+++ b/sysdeps/unix/sysv/linux/sh/sh4/register-dump.h
@@ -17,7 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* We will print the register dump in this format:
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h b/sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h
index 0d0cdd6bb2..be6ad74ae1 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h
@@ -18,7 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* We will print the register dump in this format:
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h b/sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h
index 8ef6fde2fb..d8e76264f5 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h
@@ -18,7 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* We will print the register dump in this format:
diff --git a/sysdeps/unix/sysv/linux/ttyname.c b/sysdeps/unix/sysv/linux/ttyname.c
index 70b2d51a00..0cfb4740b8 100644
--- a/sysdeps/unix/sysv/linux/ttyname.c
+++ b/sysdeps/unix/sysv/linux/ttyname.c
@@ -27,7 +27,7 @@
#include <string.h>
#include <stdlib.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <kernel-features.h>
#if 0
diff --git a/sysdeps/unix/sysv/linux/ttyname_r.c b/sysdeps/unix/sysv/linux/ttyname_r.c
index a12849a777..f097311a15 100644
--- a/sysdeps/unix/sysv/linux/ttyname_r.c
+++ b/sysdeps/unix/sysv/linux/ttyname_r.c
@@ -27,7 +27,7 @@
#include <string.h>
#include <stdlib.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
#include <kernel-features.h>
static int getttyname_r (char *buf, size_t buflen,
diff --git a/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
index 3f1530d314..44d76e8aa1 100644
--- a/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
+++ b/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
@@ -1,3 +1,3 @@
/LD_TRACE_LOADED_OBJECTS=1/a\
add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
-s_^\(RTLDLIST=\)\(.*lib\)\(\|64\)\(/[^/]*\)\(-x86-64\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2\4\6 \264\4\5\6"_
+s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6"_
diff --git a/sysdeps/unix/sysv/linux/x86_64/register-dump.h b/sysdeps/unix/sysv/linux/x86_64/register-dump.h
index 83157916d9..3ef8e09b6b 100644
--- a/sysdeps/unix/sysv/linux/x86_64/register-dump.h
+++ b/sysdeps/unix/sysv/linux/x86_64/register-dump.h
@@ -17,7 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
/* We will print the register dump in this format:
diff --git a/sysdeps/x86_64/bits/atomic.h b/sysdeps/x86_64/bits/atomic.h
index 4b8d2ab095..100943fa1e 100644
--- a/sysdeps/x86_64/bits/atomic.h
+++ b/sysdeps/x86_64/bits/atomic.h
@@ -101,8 +101,8 @@ typedef uintmax_t uatomic_max_t;
"lock\n" \
"0:\tcmpxchgq %q2, %1" \
: "=a" (ret), "=m" (*mem) \
- : "q" ((long int) (newval)), "m" (*mem), \
- "0" ((long int)oldval), \
+ : "q" ((atomic64_t) (newval)), "m" (*mem), \
+ "0" ((atomic64_t) (oldval)), \
"i" (offsetof (tcbhead_t, multiple_threads))); \
ret; })
@@ -125,7 +125,7 @@ typedef uintmax_t uatomic_max_t;
else \
__asm __volatile ("xchgq %q0, %1" \
: "=r" (result), "=m" (*mem) \
- : "0" ((long) (newvalue)), "m" (*mem)); \
+ : "0" ((atomic64_t) (newvalue)), "m" (*mem)); \
result; })
@@ -149,7 +149,7 @@ typedef uintmax_t uatomic_max_t;
else \
__asm __volatile (lock "xaddq %q0, %1" \
: "=r" (result), "=m" (*mem) \
- : "0" ((long) (value)), "m" (*mem), \
+ : "0" ((atomic64_t) (value)), "m" (*mem), \
"i" (offsetof (tcbhead_t, multiple_threads))); \
result; })
@@ -187,7 +187,7 @@ typedef uintmax_t uatomic_max_t;
else \
__asm __volatile (lock "addq %q1, %0" \
: "=m" (*mem) \
- : "ir" ((long) (value)), "m" (*mem), \
+ : "ir" ((atomic64_t) (value)), "m" (*mem), \
"i" (offsetof (tcbhead_t, multiple_threads))); \
} while (0)
@@ -218,7 +218,7 @@ typedef uintmax_t uatomic_max_t;
else \
__asm __volatile (LOCK_PREFIX "addq %q2, %0; sets %1" \
: "=m" (*mem), "=qm" (__result) \
- : "ir" ((long) (value)), "m" (*mem)); \
+ : "ir" ((atomic64_t) (value)), "m" (*mem)); \
__result; })
@@ -239,7 +239,7 @@ typedef uintmax_t uatomic_max_t;
else \
__asm __volatile (LOCK_PREFIX "addq %q2, %0; setz %1" \
: "=m" (*mem), "=qm" (__result) \
- : "ir" ((long) (value)), "m" (*mem)); \
+ : "ir" ((atomic64_t) (value)), "m" (*mem)); \
__result; })
diff --git a/sysdeps/x86_64/bits/link.h b/sysdeps/x86_64/bits/link.h
index c79eda846d..fa2091085f 100644
--- a/sysdeps/x86_64/bits/link.h
+++ b/sysdeps/x86_64/bits/link.h
@@ -20,7 +20,7 @@
#endif
-#if __ELF_NATIVE_CLASS == 32
+#ifndef __x86_64__
/* Registers for entry into PLT on IA-32. */
typedef struct La_i86_regs
{
@@ -105,6 +105,8 @@ typedef struct La_x86_64_retval
La_x86_64_vector lrv_vector1;
} La_x86_64_retval;
+#define La_x32_regs La_x86_64_regs
+#define La_x32_retval La_x86_64_retval
__BEGIN_DECLS
@@ -124,6 +126,22 @@ extern unsigned int la_x86_64_gnu_pltexit (Elf64_Sym *__sym,
La_x86_64_retval *__outregs,
const char *__symname);
+extern Elf32_Addr la_x32_gnu_pltenter (Elf32_Sym *__sym,
+ unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_x32_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_x32_gnu_pltexit (Elf32_Sym *__sym,
+ unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_x32_regs *__inregs,
+ La_x32_retval *__outregs,
+ const char *__symname);
+
__END_DECLS
#endif
diff --git a/sysdeps/x86_64/bits/mathdef.h b/sysdeps/x86_64/bits/mathdef.h
index 846a350a0e..c202ad5928 100644
--- a/sysdeps/x86_64/bits/mathdef.h
+++ b/sysdeps/x86_64/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2004, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,9 +22,7 @@
#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
# define _MATH_H_MATHDEF 1
-# include <bits/wordsize.h>
-
-# if __WORDSIZE == 64 || (defined __FLT_EVAL_METHOD__ && __FLT_EVAL_METHOD__ == 0)
+# if defined __x86_64__ || (defined __FLT_EVAL_METHOD__ && __FLT_EVAL_METHOD__ == 0)
/* The x86-64 architecture computes values with the precission of the
used type. Similarly for -m32 -mfpmath=sse. */
typedef float float_t; /* `float' expressions are evaluated as `float'. */
diff --git a/sysdeps/x86_64/bits/setjmp.h b/sysdeps/x86_64/bits/setjmp.h
index a66ca0fa5a..bb6920d44e 100644
--- a/sysdeps/x86_64/bits/setjmp.h
+++ b/sysdeps/x86_64/bits/setjmp.h
@@ -29,6 +29,8 @@
# if __WORDSIZE == 64
typedef long int __jmp_buf[8];
+# elif defined __x86_64__
+typedef long long int __jmp_buf[8];
# else
typedef int __jmp_buf[6];
# endif
diff --git a/sysdeps/x86_64/dl-irel.h b/sysdeps/x86_64/dl-irel.h
index bc7e54e985..830f5db8c8 100644
--- a/sysdeps/x86_64/dl-irel.h
+++ b/sysdeps/x86_64/dl-irel.h
@@ -25,23 +25,23 @@
#define ELF_MACHINE_IRELA 1
-static inline Elf64_Addr
+static inline ElfW(Addr)
__attribute ((always_inline))
-elf_ifunc_invoke (Elf64_Addr addr)
+elf_ifunc_invoke (ElfW(Addr) addr)
{
- return ((Elf64_Addr (*) (void)) (addr)) ();
+ return ((ElfW(Addr) (*) (void)) (addr)) ();
}
static inline void
__attribute ((always_inline))
-elf_irela (const Elf64_Rela *reloc)
+elf_irela (const ElfW(Rela) *reloc)
{
- Elf64_Addr *const reloc_addr = (void *) reloc->r_offset;
- const unsigned long int r_type = ELF64_R_TYPE (reloc->r_info);
+ ElfW(Addr) *const reloc_addr = (void *) reloc->r_offset;
+ const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info);
if (__builtin_expect (r_type == R_X86_64_IRELATIVE, 1))
{
- Elf64_Addr value = elf_ifunc_invoke(reloc->r_addend);
+ ElfW(Addr) value = elf_ifunc_invoke(reloc->r_addend);
*reloc_addr = value;
}
else
diff --git a/sysdeps/x86_64/dl-tls.h b/sysdeps/x86_64/dl-tls.h
index 4de5815605..56162ee64a 100644
--- a/sysdeps/x86_64/dl-tls.h
+++ b/sysdeps/x86_64/dl-tls.h
@@ -20,8 +20,8 @@
/* Type used for the representation of TLS information in the GOT. */
typedef struct dl_tls_index
{
- unsigned long int ti_module;
- unsigned long int ti_offset;
+ uint64_t ti_module;
+ uint64_t ti_offset;
} tls_index;
diff --git a/sysdeps/x86_64/dl-tlsdesc.h b/sysdeps/x86_64/dl-tlsdesc.h
index 82a010922d..06ede02148 100644
--- a/sysdeps/x86_64/dl-tlsdesc.h
+++ b/sysdeps/x86_64/dl-tlsdesc.h
@@ -29,14 +29,24 @@
/* Type used to represent a TLS descriptor in the GOT. */
struct tlsdesc
{
- ptrdiff_t (*entry)(struct tlsdesc *on_rax);
- void *arg;
+ /* Anonymous union is used here to ensure that GOT entry slot is always
+ 8 bytes for both x32 and x86-64. */
+ union
+ {
+ ptrdiff_t (*entry) (struct tlsdesc *on_rax);
+ uint64_t entry_slot;
+ };
+ union
+ {
+ void *arg;
+ uint64_t arg_slot;
+ };
};
typedef struct dl_tls_index
{
- unsigned long int ti_module;
- unsigned long int ti_offset;
+ uint64_t ti_module;
+ uint64_t ti_offset;
} tls_index;
/* Type used as the argument in a TLS descriptor for a symbol that
diff --git a/sysdeps/x86_64/fpu/bits/fenv.h b/sysdeps/x86_64/fpu/bits/fenv.h
index 502437676d..bb790c936a 100644
--- a/sysdeps/x86_64/fpu/bits/fenv.h
+++ b/sysdeps/x86_64/fpu/bits/fenv.h
@@ -19,9 +19,6 @@
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
#endif
-#include <bits/wordsize.h>
-
-
/* Define bits representing the exception. We use the bit positions
of the appropriate bits in the FPU control word. */
enum
@@ -81,7 +78,7 @@ typedef struct
unsigned int __data_offset;
unsigned short int __data_selector;
unsigned short int __unused5;
-#if __WORDSIZE == 64
+#ifdef __x86_64__
unsigned int __mxcsr;
#endif
}
diff --git a/sysdeps/x86_64/fpu/bits/mathinline.h b/sysdeps/x86_64/fpu/bits/mathinline.h
index 5a9ce8b1b0..c072f16a21 100644
--- a/sysdeps/x86_64/fpu/bits/mathinline.h
+++ b/sysdeps/x86_64/fpu/bits/mathinline.h
@@ -20,8 +20,6 @@
# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
#endif
-#include <bits/wordsize.h>
-
#ifndef __extern_always_inline
# define __MATH_INLINE __inline
#else
@@ -38,7 +36,7 @@ __BEGIN_NAMESPACE_C99
__MATH_INLINE int
__NTH (__signbitf (float __x))
{
-# if __WORDSIZE == 32
+# ifndef __x86_64__
__extension__ union { float __f; int __i; } __u = { __f: __x };
return __u.__i < 0;
# else
@@ -50,7 +48,7 @@ __NTH (__signbitf (float __x))
__MATH_INLINE int
__NTH (__signbit (double __x))
{
-# if __WORDSIZE == 32
+# ifndef __x86_64__
__extension__ union { double __d; int __i[2]; } __u = { __d: __x };
return __u.__i[1] < 0;
# else
@@ -94,7 +92,7 @@ __NTH (lrint (double __x))
return __res;
}
# endif
-# if __WORDSIZE == 64
+# ifdef __x86_64__
__MATH_INLINE long long int
__NTH (llrintf (float __x))
{
diff --git a/sysdeps/x86_64/fpu/e_powl.S b/sysdeps/x86_64/fpu/e_powl.S
index bd6d828027..562791d302 100644
--- a/sysdeps/x86_64/fpu/e_powl.S
+++ b/sysdeps/x86_64/fpu/e_powl.S
@@ -32,6 +32,9 @@ limit: .double 0.29
ASM_TYPE_DIRECTIVE(p63,@object)
p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
ASM_SIZE_DIRECTIVE(p63)
+ ASM_TYPE_DIRECTIVE(p64,@object)
+p64: .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x43
+ ASM_SIZE_DIRECTIVE(p64)
.section .rodata.cst16,"aM",@progbits,16
@@ -227,6 +230,19 @@ ENTRY(__ieee754_powl)
testb $2, %dh
jz 16f // jump if x == +inf
+ // fistpll raises invalid exception for |y| >= 1L<<63, but y
+ // may be odd unless we know |y| >= 1L<<64.
+ fldl MO(p64) // 1L<<64 : y
+ fld %st(1) // y : 1L<<64 : y
+ fabs // |y| : 1L<<64 : y
+ fcomip %st(1), %st // 1L<<64 : y
+ fstp %st(0) // y
+ jnc 16f
+ fldl MO(p63) // p63 : y
+ fxch // y : p63
+ fprem // y%p63 : p63
+ fstp %st(1) // y%p63
+
// We must find out whether y is an odd integer.
fld %st // y : y
fistpll -8(%rsp) // y
@@ -284,6 +300,19 @@ ENTRY(__ieee754_powl)
testb $2, %dh
jz 25f
+ // fistpll raises invalid exception for |y| >= 1L<<63, but y
+ // may be odd unless we know |y| >= 1L<<64.
+ fldl MO(p64) // 1L<<64 : y
+ fld %st(1) // y : 1L<<64 : y
+ fabs // |y| : 1L<<64 : y
+ fcomip %st(1), %st // 1L<<64 : y
+ fstp %st(0) // y
+ jnc 25f
+ fldl MO(p63) // p63 : y
+ fxch // y : p63
+ fprem // y%p63 : p63
+ fstp %st(1) // y%p63
+
fld %st // y : y
fistpll -8(%rsp) // y
fildll -8(%rsp) // int(y) : y
@@ -315,6 +344,18 @@ ENTRY(__ieee754_powl)
21: testb $2, %dh
jz 22f
+ // fistpll raises invalid exception for |y| >= 1L<<63, but y
+ // may be odd unless we know |y| >= 1L<<64.
+ fldl MO(p64) // 1L<<64 : y
+ fxch // y : 1L<<64
+ fcomi %st(1), %st // y : 1L<<64
+ fstp %st(1) // y
+ jnc 22f
+ fldl MO(p63) // p63 : y
+ fxch // y : p63
+ fprem // y%p63 : p63
+ fstp %st(1) // y%p63
+
fld %st // y : y
fistpll -8(%rsp) // y
fildll -8(%rsp) // int(y) : y
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index fef6ea1a8a..d43955aff8 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -482,15 +482,61 @@ float: 1
ifloat: 1
# cexp
+Test "Real part of: cexp (-10000 + 0x1p16383 i) == 1.045876464564882298442774542991176546722e-4343 + 4.421154026488516836023811173959413420548e-4344 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
+Test "Real part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i":
+double: 1
+idouble: 1
Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
float: 1
ifloat: 1
Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: cexp (11356.5625 + 0.75 i) == 9.052188470850960144814815984311663764287e4931 + 8.432986734191301036267148978260970230200e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (1440 + 0x1p-1074 i) == inf + 1.196295853897226111293303155636183216483e302 i plus overflow exception":
+double: 1
+idouble: 1
+Test "Real part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i":
+double: 1
+idouble: 1
+Test "Real part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i":
+double: 1
+idouble: 1
+Test "Real part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i":
+float: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
# clog
Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
@@ -2090,12 +2136,18 @@ ildouble: 1
ldouble: 1
Function: Real part of "cexp":
+double: 2
float: 1
+idouble: 2
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "cexp":
-float: 1
-ifloat: 1
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
ildouble: 1
ldouble: 1
diff --git a/sysdeps/x86_64/fpu/math_private.h b/sysdeps/x86_64/fpu/math_private.h
index 67c5f6a324..63a699e8fc 100644
--- a/sysdeps/x86_64/fpu/math_private.h
+++ b/sysdeps/x86_64/fpu/math_private.h
@@ -12,7 +12,7 @@
/* Direct movement of float into integer register. */
#define EXTRACT_WORDS64(i, d) \
do { \
- long int i_; \
+ int64_t i_; \
asm (MOVD " %1, %0" : "=rm" (i_) : "x" ((double) (d))); \
(i) = i_; \
} while (0)
@@ -20,7 +20,7 @@
/* And the reverse. */
#define INSERT_WORDS64(d, i) \
do { \
- long int i_ = i; \
+ int64_t i_ = i; \
double d__; \
asm (MOVD " %1, %0" : "=x" (d__) : "rm" (i_)); \
d = d__; \
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 2a38ffc764..12b0526e50 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -7,10 +7,9 @@ libm-sysdep_routines += e_exp-fma4 e_log-fma4 e_pow-fma4 s_atan-fma4 \
e_asin-fma4 e_atan2-fma4 s_sin-fma4 s_tan-fma4 \
mplog-fma4 mpa-fma4 slowexp-fma4 slowpow-fma4 \
sincos32-fma4 doasin-fma4 dosincos-fma4 \
- brandred-fma4 halfulp-fma4 mpexp-fma4 \
+ halfulp-fma4 mpexp-fma4 \
mpatan2-fma4 mpatan-fma4 mpsqrt-fma4 mptan-fma4
-CFLAGS-brandred-fma4.c = -mfma4
CFLAGS-doasin-fma4.c = -mfma4
CFLAGS-dosincos-fma4.c = -mfma4
CFLAGS-e_asin-fma4.c = -mfma4
diff --git a/sysdeps/x86_64/fpu/multiarch/brandred-fma4.c b/sysdeps/x86_64/fpu/multiarch/brandred-fma4.c
deleted file mode 100644
index f4f68ac962..0000000000
--- a/sysdeps/x86_64/fpu/multiarch/brandred-fma4.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define __branred __branred_fma4
-#define SECTION __attribute__ ((section (".text.fma4")))
-
-#include <sysdeps/ieee754/dbl-64/branred.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c b/sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c
index 2501af981a..4c35739dc9 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c
@@ -1,6 +1,5 @@
#define __cos __cos_fma4
#define __sin __sin_fma4
-#define __branred __branred_fma4
#define __docos __docos_fma4
#define __dubsin __dubsin_fma4
#define __mpcos __mpcos_fma4
diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c b/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c
index d7dab3ca9e..a805440b46 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c
@@ -1,5 +1,4 @@
#define tan __tan_fma4
-#define __branred __branred_fma4
#define __dbl_mp __dbl_mp_fma4
#define __mpranred __mpranred_fma4
#define __mptan __mptan_fma4
diff --git a/sysdeps/x86_64/jmpbuf-unwind.h b/sysdeps/x86_64/jmpbuf-unwind.h
index 646615d43b..890037ea7e 100644
--- a/sysdeps/x86_64/jmpbuf-unwind.h
+++ b/sysdeps/x86_64/jmpbuf-unwind.h
@@ -28,7 +28,9 @@
((void *) (address) < (void *) demangle ((jmpbuf)[JB_RSP]))
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+ _JMPBUF_UNWINDS_ADJ (_jmpbuf, \
+ (void *) (_Unwind_Ptr) _Unwind_GetCFA (_context), \
+ _adj)
static inline uintptr_t __attribute__ ((unused))
_jmpbuf_sp (__jmp_buf regs)
diff --git a/sysdeps/x86_64/preconfigure b/sysdeps/x86_64/preconfigure
new file mode 100644
index 0000000000..48ba6a1516
--- /dev/null
+++ b/sysdeps/x86_64/preconfigure
@@ -0,0 +1,162 @@
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local preconfigure fragment for sysdeps/x86_64
+
+test -n "$base_machine" || case "$machine" in
+x86_64)
+ base_machine=x86_64
+ # Check if we are building for x32.
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC compiles in -mx32 mode by default" >&5
+$as_echo_n "checking whether $CC compiles in -mx32 mode by default... " >&6; }
+if ${libc_cv_x32+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __LP64__
+# error not x32
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ libc_cv_x32=yes
+else
+ libc_cv_x32=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x32" >&5
+$as_echo "$libc_cv_x32" >&6; }
+ if test $libc_cv_x32 = yes; then
+ machine=x86_64/x32
+ else
+ machine=x86_64/64
+ fi
+ ;;
+esac
diff --git a/sysdeps/x86_64/preconfigure.in b/sysdeps/x86_64/preconfigure.in
new file mode 100644
index 0000000000..1f049c7a04
--- /dev/null
+++ b/sysdeps/x86_64/preconfigure.in
@@ -0,0 +1,20 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local preconfigure fragment for sysdeps/x86_64
+
+test -n "$base_machine" || case "$machine" in
+x86_64)
+ base_machine=x86_64
+ # Check if we are building for x32.
+ AC_CACHE_CHECK(whether $CC compiles in -mx32 mode by default,
+ libc_cv_x32, [dnl
+ AC_TRY_COMPILE(dnl
+[#ifdef __LP64__
+# error not x32
+#endif], [], libc_cv_x32=yes, libc_cv_x32=no)])
+ if test $libc_cv_x32 = yes; then
+ machine=x86_64/x32
+ else
+ machine=x86_64/64
+ fi
+ ;;
+esac
diff --git a/timezone/Makefile b/timezone/Makefile
index 00bfba6e23..9e55a6ac54 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -45,7 +45,6 @@ include ../Makeconfig # Get objpfx defined so we can use it below.
CPPFLAGS-zic = -DNOT_IN_libc
ifeq ($(have-ksh),yes)
-install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
install-bin-script = tzselect
generated += tzselect
endif
@@ -111,7 +110,3 @@ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
-e 's%@TZDIR@%$(zonedir)%g' < $< > $@.new
chmod 555 $@.new
mv -f $@.new $@
-
-$(addprefix $(inst_zonedir)/,iso3166.tab zone.tab): \
- $(inst_zonedir)/%: % $(+force)
- $(do-install)