aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
AgeCommit message (Collapse)AuthorFilesLines
2014-05-22PowerPC: Remove unneeded copysign[f] macrosAdhemerval Zanella1-27/+0
This patch remove the unneeded copysign[f] macro from powerpc math_private.h, since they are already covered in generic version.
2014-05-22PowerPC: Fix memchr ifunc hidden symbol for PPC32Adhemerval Zanella2-10/+14
This patch fixes a similar issue to 736c304a1ab4cee36a2f3343f1698bc0abae4608, where for PPC32 if the symbol is defined as hidden (memchr) then compiler will create a local branc (symbol@local) and the linker will not create a required PLT call to make the ifunc work. It changes the default hidden symbol (__GI_memchr) to default memchr symbol for powerpc32 (__memchr_ppc32).
2014-05-21AArch64: Convert fork.c to arch-fork.hRoland McGrath1-4/+2
2014-05-21Consistently use $(elf-objpfx).Joseph Myers2-3/+3
As previously noted <https://sourceware.org/ml/libc-alpha/2013-05/msg00696.html>, $(elf-objpfx) and $(elfobjdir) are redundant and should be consolidated. This patch consolidates on $(elf-objpfx) (for consistency with $(csu-objpfx)), also changing direct uses of $(common-objpfx)elf/ to use $(elf-objpfx). Tested x86_64, including that installed shared libraries are unchanged by the patch. * Makeconfig [$(build-hardcoded-path-in-tests) = yes] (rtld-tests-LDFLAGS): Use $(elf-objpfx) instead of $(common-objpfx)elf/. (link-libc-before-gnulib): Likewise. (elfobjdir): Remove variable. * Makefile (install): Use $(elf-objpfx) instead of $(common-objpfx)elf/. * Makerules (link-libc-args): Use $(elf-objpfx) instead of $(elfobjdir)/. (link-libc-deps): Likewise. ($(common-objpfx)libc.so): Likewise. ($(common-objpfx)linkobj/libc.so): Likewise. [$(cross-compiling) = no] (symbolic-link-prog): Use $(elf-objpfx) instead of $(common-objpfx)elf/. (symbolic-link-list): Likewise. * iconvdata/Makefile ($(inst_gconvdir)/gconv-modules) [$(cross-compiling) = no]: Likewise. * sysdeps/arm/Makefile (gnulib-arch): Use $(elf-objpfx) instead of $(elfobjdir)/. (static-gnulib-arch): Likewise. * sysdeps/s390/s390-64/Makefile ($(inst_gconvdir)/gconv-modules) [$(cross-compiling) = no]: Use $(elf-objpfx) instead of $(common-objpfx)elf/. localedata/ChangeLog: * Makefile (LOCALEDEF): Use $(elf-objpfx) instead of $(common-objpfx)elf/.
2014-05-21aarch64: Merge __local_multiple_threads offset with memory referenceRichard Henderson1-5/+4
This also highlights that we'd been loading 64-bits instead of the proper 32-bits. Caught by the linker as a relocation error, since the variable happened to be unaligned for 64-bits.
2014-05-21aarch64: Merge rtld_errno offset with memory referenceRichard Henderson1-2/+1
2014-05-20Fix ARM build with GCC trunk.Joseph Myers2-2/+4
sysdeps/unix/sysv/linux/arm/unwind-resume.c and sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static variables that are written in C code but only read from toplevel asms. Current GCC trunk now optimizes away such apparently write-only static variables, so causing a build failure. This patch marks those variables with __attribute_used__ to avoid that optimization. Tested that this fixes the build for ARM. * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c (libgcc_s_resume): Use __attribute_used__. * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): Likewise.
2014-05-20Update powerpc-fpu ULPs.Adhemerval Zanella1-0/+63
2014-05-20PowerPC: Fix copysignf optimization macroAdhemerval Zanella1-1/+3
This patch fixes the __copysignf optimized macro meant to internal libm usage when used with constant value. Without the explicit cast to float, if it is used with const double value (for instance, on s_casinhf.c) double constants will be used and it may lead to precision issues in some algorithms. It fixes the following failures on PPC64/POWER7: Failure: Test: Real part of: cacos_downward (inf + 0 i) Result: is: 1.19209289550781250000e-07 0x1.00000000000000000000p-23 should be: 0.00000000000000000000e+00 0x0.00000000000000000000p+0 Failure: Test: Real part of: cacos_downward (inf - 0 i) Result: is: 1.19209289550781250000e-07 0x1.00000000000000000000p-23 should be: 0.00000000000000000000e+00 0x0.00000000000000000000p+0 Failure: Test: Real part of: cacos_downward (inf + 0.5 i) Result: is: 1.19209289550781250000e-07 0x1.00000000000000000000p-23 should be: 0.00000000000000000000e+00 0x0.00000000000000000000p+0 Failure: Test: Real part of: cacos_downward (inf - 0.5 i) Result: is: 1.19209289550781250000e-07 0x1.00000000000000000000p-23 should be: 0.00000000000000000000e+00 0x0.00000000000000000000p+0 Failure: Test: Real part of: cacos_towardzero (inf + 0 i) Result: is: 1.19209289550781250000e-07 0x1.00000000000000000000p-23 should be: 0.00000000000000000000e+00 0x0.00000000000000000000p+0 Failure: Test: Real part of: cacos_towardzero (inf - 0 i) Result: is: 1.19209289550781250000e-07 0x1.00000000000000000000p-23 should be: 0.00000000000000000000e+00 0x0.00000000000000000000p+0 Failure: Test: Real part of: cacos_towardzero (inf + 0.5 i) Result: is: 1.19209289550781250000e-07 0x1.00000000000000000000p-23 should be: 0.00000000000000000000e+00 0x0.00000000000000000000p+0 Failure: Test: Real part of: cacos_towardzero (inf - 0.5 i) Result: is: 1.19209289550781250000e-07 0x1.00000000000000000000p-23 should be: 0.00000000000000000000e+00 0x0.00000000000000000000p+0
2014-05-20alpha: fix sa_flags type (BZ 16967)Richard Henderson1-1/+1
2014-05-20alpha: Remove bits/siginfo.h (BZ 16966)Richard Henderson1-333/+0
Using the default header instead. This matches the kernel, which also uses the generic header. Fixes the sys/wait.h conform issue, where si_band had the wrong type.
2014-05-20alpha: Define ELF_MACHINE_NO_RELARichard Henderson1-0/+1
2014-05-20AArch64: Fix handling of nocancel syscall failuresWill Newton1-0/+1
The current code for nocancel syscalls does not do a comparison of the system call return value. This leads to code being generated where the b.cs follows the svc instruction directly without setting the flags on which the branch depends. ChangeLog: 2014-05-20 Will Newton <will.newton@linaro.org> * sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h (PSEUDO): Test the return value of the system call in the nocancel case.
2014-05-20AArch64: Remove asm/ptrace.h inclusion in sys/user.h and sys/procfs.hYvan Roux2-21/+16
This patch fixes an issue observed by the Xen project, where including signal.h exposes various PSR_MODE #defines. This is due to the usage in sys/user.h and sys/procfs.h of the struct user_pt_regs and user_fpsimd_state included via asm/ptrace.h. The namespace pollution this inclusion introduce is already partially fixed with some #undef of the PTRACE_* symbols, but other symbols like the PSR_MODE ones are still present, and undefining them is not safe since a user can include ptrace.h before user.h. My proposition is to define the 2 structures we need in user.h and get rid of the asm/ptrace.h inclusion. Build and make check are clean on AArch64. 2014-05-20 Will Newton <will.newton@linaro.org> Yvan Roux <yvan.roux@linaro.org> * sysdeps/unix/sysv/linux/aarch64/sys/user.h: Remove unused #include of asm/ptrace.h. (PTRACE_GET_THREAD_AREA): Remove #undef. (PTRACE_GETHBPREGS): Likewise. (PTRACE_SETHBPREGS): Likewise. (struct user_regs_struct): New structure. (struct user_fpsimd_struct): New structure. * sysdeps/unix/sysv/linux/aarch64/sys/procfs.h: Remove unused #include of asm/ptrace.h and second #include of sys/user.h. (PTRACE_GET_THREAD_AREA): Remove #undef. (PTRACE_GETHBPREGS): Likewise. (PTRACE_SETHBPREGS): Likewise. (ELF_NGREG): Use new struct user_regs_struct. (elf_fpregset_t): Use new struct user_fpsimd_struct.
2014-05-19PowerPC: Fix multiarch hypotf PPC64 pathAdhemerval Zanella1-0/+0
This patch moves the hypotf multiarch implementation to correct path.
2014-05-19Revert "ARM: Improve fenv implementation"Marcus Shawcroft12-75/+99
This reverts commit c0c08d02c82275353f5c556f935a1a01714d9d7f.
2014-05-17Fix sparc memcpy data corruption when using niagara2 optimized routines.Jose E. Marchesi1-0/+1
* sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Add missing membar to avoid block loads/stores to overlap previous stores.
2014-05-17alpha: Create __syscall_nocancel entry pointsRichard Henderson2-21/+16
2014-05-17Merge remote-tracking branch 'origin/roland/nptl-alpha'Richard Henderson1-10/+8
2014-05-17Fix some termios.h conformtest failures on sparc.David S. Miller1-14/+5
* sysdeps/unix/sysv/linux/sparc/bits/termios.h (PAGEOUT, WRAP): Protect with __USE_GNU. (TIOCSET_TEMPT): Likewise. (TIOCM_LE, TIOCM_DTR, TIOCM_RTS, TIOCM_ST, TIOCM_SR, TIOCM_CTS, TIOCM_CAR, TIOCM_RNG, TIOCM_DSR, TIOCM_CD, TIOCM_RI): Remove as these are already provided in bits/ioctl-types.h
2014-05-16Fix __waitpid_nocancel link error.linaro/masterRoland McGrath1-6/+1
2014-05-16ARM: soft-fp NaN representation correctionMaciej W. Rozycki1-3/+3
Commit 7d92b78723848ae616709eb8f0191ea067025b18 [Fix ARM NAN fraction bits.] removed all the bits set from NANFRAC macros and, when propagated to libgcc, regressed gcc.dg/torture/builtin-math-7.c on soft-fp arm-eabi targets, currently ARMv6-M (`-march=armv6-m -mthumb') only. This is because when used to construct a NaN in the semi-raw mode, they now build an infinity instead. Consequently operations such as (Inf - Inf) now produce Inf rather than NaN. The change worked for the original test case, posted with PR libgcc/60166, because division is made in the canonical mode, where the quiet bit is set separately, from the fp class. This change brings the quiet bit back to these macros, making semi-raw mode calculations produce the expected results again.
2014-05-16PowerPC: clean BSD Terminal Modes expectation in termios.hAdhemerval Zanella1-2/+9
This patch guard the BSD definition for terminal modes in PowerPC specific header fixing the following conformance failures: FAIL: conform/POSIX/termios.h/conform FAIL: conform/POSIX2008/termios.h/conform FAIL: conform/UNIX98/termios.h/conform
2014-05-16Alpha: Convert fork.c to arch-fork.hRoland McGrath1-10/+8
2014-05-16ARM: Convert fork.c to arch-fork.hRoland McGrath1-10/+7
2014-05-16Add stub arch-fork.h header.Roland McGrath1-0/+27
2014-05-16Split arch-fork.h from fork.hRoland McGrath6-6/+6
2014-05-16SPARC: add prlimit and prlimit64 in <bits/resource.h> (BZ #16943)Aurelien Jarno1-0/+27
prlimit and prlimit64 have been added in the main <bits/resource.h>, but not in the SPARC specific version. Fix that. Note: this is Debian bug#703559, reported by Emilio Pozuelo Monfort <pochu@debian.org>
2014-05-16ptsname_r: don't leak uninitialized memory (BZ #16917)Aurelien Jarno1-1/+3
If the fd refers to a terminal device, but not a pty master, the TIOCGPTN ioctl returns with ENOTTY. This error is not caught, and the possibly undefined buffer passed to ptsname_r is sent directly to the stat64 syscall. Fix this by using a fallback to the old method only if the TIOCGPTN ioctl fails with EINVAL. This also fix the return value in that specific case (it return ENOENT without this patch). Also add tests to the ptsname_r function (and ptsname at the same time). Note: this is Debian bug#741482, reported by Jakub Wilk <jwilk@debian.org>
2014-05-15ARM: Improve fenv implementationWilco12-99/+75
2014-05-15ARM: Improve fenv implementationWilco16-233/+171
2014-05-15Return EAI_AGAIN for AF_UNSPEC when herrno is TRY_AGAIN (BZ #16849)Siddhesh Poyarekar1-2/+1
getaddrinfo correctly returns EAI_AGAIN for AF_INET and AF_INET6 queries. For AF_UNSPEC however, an older change (a682a1bf553b1efe4dbb03207fece5b719cec482) broke the check and due to that the returned error was EAI_NONAME. This patch fixes the check so that a non-authoritative not-found is returned as EAI_AGAIN to the user instead of EAI_NONAME.
2014-05-14x86: Move abilist files out of nptl/ subdirectories.Roland McGrath43-0/+0
2014-05-14Move remaining files out of nptl/sysdeps/unix/sysv/linux/x86/.Roland McGrath15-0/+551
2014-05-14Fix mips fork after i386 reorganization.Roland McGrath2-1/+1
2014-05-14Move remaining nptl/sysdeps/unix/sysv/linux/i386/ files.Roland McGrath59-0/+6452
2014-05-14Fix powerpc fork after i386 reorganization.Roland McGrath1-0/+1
2014-05-14Update alpha and ia64 timer_*.c files for x86_64 file moves.Roland McGrath10-10/+10
2014-05-14Move remaining nptl/sysdeps/unix/sysv/linux/x86_64/ files.Roland McGrath24-0/+5322
2014-05-14x86: Consolidate NPTL fork.Roland McGrath2-0/+54
2014-05-14Consolidate not-cancel.h files.Roland McGrath4-63/+27
2014-05-14Move x86_64 compat-timer.h out of nptl/Roland McGrath1-0/+45
2014-05-14Move x86_64 timer_*.c out of nptl/Roland McGrath6-0/+231
2014-05-14x86: Consolidate NPTL/non versions of cloneRoland McGrath2-11/+0
2014-05-14Move NPTL public ABI headers for x86 to sysdeps/x86/nptl/.Roland McGrath4-0/+292
2014-05-14x86: Consolidate NPTL/non versions of vforkRoland McGrath2-12/+39
2014-05-14ARM: Consolidate NPTL/non versions of vforkRoland McGrath3-77/+20
2014-05-14Fix log1pl (LDBL_MAX) in FE_UPWARD mode (bug 16564).Joseph Myers4-4/+20
Bug 16564 is spurious overflow of log1pl (LDBL_MAX) in FE_UPWARD mode, resulting from log1pl adding 1 to its argument (for arguments not close to 0), which overflows in that mode. This patch fixes this by avoiding adding 1 to large arguments (precisely what counts as large depends on the floating-point format). Tested x86_64 and x86, and spot-checked log1pl tests on mips64 and powerpc64. [BZ #16564] * sysdeps/i386/fpu/s_log1pl.S (__log1pl): Do not add 1 to positive arguments with exponent 65 or above. * sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl): Do not add 1 to arguments 0x1p113L or above. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c (__log1pl): Do not add 1 to arguments 0x1p107L or above. * sysdeps/x86_64/fpu/s_log1pl.S (__log1pl): Do not add 1 to positive arguments with exponent 65 or above. * math/auto-libm-test-in: Add more tests of log1p. * math/auto-libm-test-out: Regenerated.
2014-05-14Fix cacos (+Inf + finite*i) in round-downward mode (bug 16928).Joseph Myers2-0/+96
According to C99/C11 Annex G, cacos applied to a value with real part +Inf and finite imaginary part should produce a result with real part +0. glibc wrongly produces a result with real part -0 in FE_DOWNWARD mode. This patch fixes this by checking for zero results in the relevant case of non-finite arguments (where there should never be a result with -0 real part), and converts the tests of cacos to ALL_RM_TEST. Tested x86_64 and x86 and ulps updated accordingly. [BZ #16928] * math/s_cacos.c (__cacos): Ensure zero real part of result from non-finite arguments is +0. * math/s_cacosf.c (__cacosf): Likewise. * math/s_cacosl.c (__cacosl): Likewise. * math/libm-test.inc (cacos_test): Use ALL_RM_TEST. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2014-05-14Fix acosh (1) in round-downward mode (bug 16927).Joseph Myers6-1/+31
According to C99 and C11 Annex F, acosh (1) should be +0 in all rounding modes. However, some implementations in glibc wrongly return -0 in round-downward mode (which is what you get if you end up computing log1p (-0), via 1 - 1 being -0 in round-downward mode). This patch fixes the problem implementations, by correcting the test for an exact 1 value in the ldbl-96 implementation to allow for the explicit high bit of the mantissa, and by inserting fabs instructions in the i386 implementations; tests of acosh are duly converted to ALL_RM_TEST. I believe all the other sysdeps/ieee754 implementations are already OK (I haven't checked the ia64 versions, but if buggy then that will be obvious from the results of test runs after this patch is in). Tested x86_64 and x86 and ulps updated accordingly. [BZ #16927] * sysdeps/i386/fpu/e_acosh.S (__ieee754_acosh): Use fabs on x-1 value. * sysdeps/i386/fpu/e_acoshf.S (__ieee754_acoshf): Likewise. * sysdeps/i386/fpu/e_acoshl.S (__ieee754_acoshl): Likewise. * sysdeps/ieee754/ldbl-96/e_acoshl.c (__ieee754_acoshl): Correct for explicit high bit of mantissa when testing for argument equal to 1. * math/libm-test.inc (acosh_test): Use ALL_RM_TEST. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.