about summary refs log tree commit diff
path: root/sysdeps
Commit message (Collapse)AuthorAgeFilesLines
* powerpc: Fix compiler warning on some syscallsAdhemerval Zanella2015-01-084-8/+9
| | | | | | | | | | | | | | | | | GCC 5.0 emits an warning when using sizeof on array function parameters and powerpc internal syscall macros add a check for such cases. More specifically, on powerpc64 and powerpc32 sysdep.h: if (__builtin_classify_type (__arg3) != 5 && sizeof (__arg3) > 8) \ __illegally_sized_syscall_arg3 (); \ And for sysdeps/unix/sysv/linux/utimensat.c build GCC emits: error: ‘sizeof’ on array function parameter ‘tsp’ will return size of ‘const struct timespec *’ This patch uses the address of first struct member instead of the struct itself in syscall macro.
* Fix libm feupdateenv namespace (bug 17748).Joseph Myers2015-01-0717-17/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Concluding the fixes for C90 libm functions calling C99 fe* functions, this patch fixes the case of feupdateenv by making it a weak alias for __feupdateenv and making the affected code call __feupdateenv. Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by the patch). Also tested for ARM (soft-float) that the math.h linknamespace tests now pass. [BZ #17748] * include/fenv.h (__feupdateenv): Use libm_hidden_proto. * math/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/aarch64/fpu/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/alpha/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/arm/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/i386/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/m68k/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/powerpc/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/sparc/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/tile/math_private.h (__feupdateenv): New inline function. * sysdeps/x86_64/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/generic/math_private.h (default_libc_feupdateenv): Call __feupdateenv instead of feupdateenv. (default_libc_feupdateenv_test): Likewise. (libc_feresetround_ctx): Likewise.
* mips: Fix __libc_pread prototypeAdhemerval Zanella2015-01-071-1/+1
| | | | | This patch fixes the __libc_pread prototype change from 14bb4e57c094849228ad8524693ab9432c38396c.
* AArch64: Optimized implementations of strcpy and stpcpy.Richard Earnshaw2015-01-072-0/+346
|
* AArch64 optimized implementation of strrchr.Richard Earnshaw2015-01-071-0/+165
|
* Fix libm fesetround namespace (bug 17748).Joseph Myers2015-01-0719-37/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the fixes for C90 libm functions calling C99 fe* functions, this patch fixes the case of fesetround by making it a weak alias of __fesetround and making the affected code call __fesetround. An existing __fesetround function in fenv_libc.h for powerpc is renamed to __fesetround_inline. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). Also tested for ARM (soft-float) that fesetround failures disappear from the linknamespace test results (feupdateenv remains to be addressed to complete fixing bug 17748). [BZ #17748] * include/fenv.h (__fesetround): Declare. Use libm_hidden_proto. * math/fesetround.c (fesetround): Rename to __fesetround and define as weak alias of __fesetround. Use libm_hidden_weak. * sysdeps/aarch64/fpu/fesetround.c (fesetround): Likewise. * sysdeps/alpha/fpu/fesetround.c (fesetround): Likewise. * sysdeps/arm/fesetround.c (fesetround): Likewise. * sysdeps/hppa/fpu/fesetround.c (fesetround): Likewise. * sysdeps/i386/fpu/fesetround.c (fesetround): Likewise. * sysdeps/ia64/fpu/fesetround.c (fesetround): Likewise. * sysdeps/m68k/fpu/fesetround.c (fesetround): Likewise. * sysdeps/mips/fpu/fesetround.c (fesetround): Likewise. * sysdeps/powerpc/fpu/fenv_libc.h (__fesetround): Rename to __fesetround_inline. * sysdeps/powerpc/fpu/fenv_private.h (libc_fesetround_ppc): Call __fesetround_inline instead of __fesetround. * sysdeps/powerpc/fpu/fesetround.c (fesetround): Rename to __fesetround and define as weak alias of __fesetround. Use libm_hidden_weak. Call __fesetround_inline instead of __fesetround. * sysdeps/powerpc/nofpu/fesetround.c (fesetround): Rename to __fesetround and define as weak alias of __fesetround. Use libm_hidden_weak. * sysdeps/powerpc/powerpc32/e500/nofpu/fesetround.c (fesetround): Likewise. * sysdeps/s390/fpu/fesetround.c (fesetround): Likewise. * sysdeps/sh/sh4/fpu/fesetround.c (fesetround): Likewise. * sysdeps/sparc/fpu/fesetround.c (fesetround): Likewise. * sysdeps/tile/math_private.h (__fesetround): New inline function. * sysdeps/x86_64/fpu/fesetround.c (fesetround): Rename to __fesetround and define as weak alias of __fesetround. Use libm_hidden_weak. * sysdeps/generic/math_private.h (default_libc_fesetround): Call __fesetround instead of fesetround. (default_libc_feholdexcept_setround): Likewise. (libc_feholdsetround_ctx): Likewise. (libc_feholdsetround_noex_ctx): Likewise.
* Fix libm fesetenv namespace (bug 17748).Joseph Myers2015-01-0629-30/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the fixes for C90 libm functions calling C99 fe* functions, this patch fixes the case of fesetenv by making it a weak alias of __fesetenv and making the affected code (including various copies of feupdateenv which also gets called from C90 functions) call __fesetenv. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). Also tested for ARM (soft-float) that fesetenv failures disappear from the linknamespace test results (fsetround and feupdateenv remain to be addressed to complete fixing bug 17748). [BZ #17748] * include/fenv.h (__fesetenv): Use libm_hidden_proto. * math/fesetenv.c (__fesetenv): Use libm_hidden_def. * sysdeps/aarch64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and define as weak alias of __fesetenv. Use libm_hidden_weak. * sysdeps/alpha/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def. * sysdeps/arm/fesetenv.c (fesetenv): Rename to __fesetenv and define as weak alias of __fesetenv. Use libm_hidden_weak. * sysdeps/hppa/fpu/fesetenv.c (fesetenv): Likewise. * sysdeps/i386/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def. * sysdeps/ia64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and define as weak alias of __fesetenv. Use libm_hidden_weak. * sysdeps/m68k/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def. * sysdeps/mips/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and define as weak alias of __fesetenv. Use libm_hidden_weak. * sysdeps/powerpc/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def. * sysdeps/powerpc/nofpu/fesetenv.c (__fesetenv): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/fesetenv.c (__fesetenv): Likewise. * sysdeps/s390/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and define as weak alias of __fesetenv. Use libm_hidden_weak. * sysdeps/sh/sh4/fpu/fesetenv.c (fesetenv): Likewise. * sysdeps/sparc/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def. * sysdeps/tile/math_private.h (__fesetenv): New inline function. * sysdeps/x86_64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and define as weak alias of __fesetenv. Use libm_hidden_weak. * sysdeps/generic/math_private.h (default_libc_fesetenv): Use __fesetenv instead of fesetenv. (libc_feresetround_noex_ctx): Likewise. * sysdeps/alpha/fpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/i386/fpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/m68k/fpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/sparc/fpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/x86_64/fpu/feupdateenv.c (__feupdateenv): Likewise.
* Clean up check_pf allocation pattern. addressesOndřej Bílka2015-01-061-84/+39
| | | | | | We simplify allocation strategy there so instead of using temporary linked list and then copying entries to output array we keep them in resizable array.
* Function declaration cleanupAdhemerval Zanella2015-01-0636-176/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the some function declaration from K&R style to default ANSI C. * nptl/pthread_cancel.c (pthread_cancel): Use ANSI prototype. * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise. * nptl/pthread_cond_wait.c (__pthread_cond_wait): Likewise. * nptl/pthread_exit.c (__pthread_exit): Likewise. * nptl/pthread_join.c (pthread_join): Likewise. * nptl/pthread_timedjoin.c (pthread_timedjoin_np): Likewise. * sysdeps/posix/waitid.c (__waitid): Likewise. * sysdeps/unix/sysv/linux/arm/pread.c (__libc_pread): Likewise. * sysdeps/unix/sysv/linux/arm/pread64.c (__libc_pread64): Likewise. * sysdeps/unix/sysv/linux/arm/pwrite.c (__libc_pwrite): Likewise. * sysdeps/unix/sysv/linux/arm/pwrite64.c (__libc_pwrite64): Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c (__libc_pread): Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c (__libc_pread64): Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c (__libc_pwrite): Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c (__libc_pwrite64): Likewsie. * sysdeps/unix/sysv/linux/mips/pread.c (__libc_pread): Likewise. * sysdeps/unix/sysv/linux/mips/pread64.c (__libc_pread64): Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c (__libc_pwrite): Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c (__libc_pwrite64): Likewise. * sysdeps/unix/sysv/linux/msgrcv.c (__libc_msgrcv): Likewise. * sysdeps/unix/sysv/linux/msgsnd.c (__libc_msgsnd): Likewise. * sysdeps/unix/sysv/linux/openat.c (OPENAT_NOT_CANCEL): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c (__libc_pread): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c (__libc_pread64): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c (__libc_pwrite): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c (__libc_pwrite64): Likewise. * sysdeps/unix/sysv/linux/pread.c (__libc_pread): Likewise. * sysdeps/unix/sysv/linux/pread64.c (__libc_pread64): Likewise. * sysdeps/unix/sysv/linux/preadv.c (PREADV): Likewise. * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Likewise. * sysdeps/unix/sysv/linux/pwrite.c (__libc_pwrite): Likewise. * sysdeps/unix/sysv/linux/pwrite64.c (__libc_pwrite64): Likewise. * sysdeps/unix/sysv/linux/pwritev.c (__libc_pwritev): Likewise. * sysdeps/unix/sysv/linux/sh/pread.c (__libc_pread): Likewise. * sysdeps/unix/sysv/linux/sh/pread64.c (__libc_pread64): Likewise. * sysdeps/unix/sysv/linux/sh/pwrite.c (__libc_pwrite): Likewise. * sysdeps/unix/sysv/linux/sh/pwrite64.c (__libc_write64): Likewise. * sysdeps/unix/sysv/linux/sigsuspend.c (__sigsuspend): Likewise. * sysdeps/unix/sysv/linux/sigtimedwait.c (__sigtimedwait): Likewise. * sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Likewise. * sysdeps/unix/sysv/linux/sigwaitinfo.c (__sigwaitinfo): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c (__libc_msgrcv): Likewise.
* Define CLOCKS_PER_SEC type to the type clock_tH.J. Lu2015-01-062-8/+7
| | | | | | | | | | | | | | C99 specifies that CLOCKS_PER_SEC is an expression with the type clock_t. This patch adds a generic <bits/time2.h> to define CLOCKS_PER_SEC and provides the Linux/x86-64 version of <bits/time2.h> to support x32. [BZ #17797] * bits/time.h (CLOCKS_PER_SEC): Changed to ((clock_t) 1000000). * sysdeps/unix/sysv/linux/bits/time.h (CLOCKS_PER_SEC): Likewise. * sysdeps/unix/sysv/linux/clock.c (clock): _Static_assert CLOCKS_PER_SEC == 1000000. * time/clocktest.c (main): Replace %ld with %jd and cast to intmax_t.
* ARM: Consolidate with generic unwinder wrapper codeRoland McGrath2015-01-0510-293/+153
|
* Merge branch 'master' of ssh://sourceware.org/git/glibcSteve Ellcey2015-01-0516-32/+62
|\
| * Fix libm feholdexcept namespace (bug 17748).Joseph Myers2015-01-0516-32/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the fixes for C90 libm functions calling C99 fe* functions, this patch fixes the case of feholdexcept by making it a weak alias of __feholdexcept and making the affected code call __feholdexcept. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). Also tested for ARM (soft-float) that feholdexcept failures disappear from the linknamespace test failures (fesetenv, fsetround and feupdateenv remain to be addressed to complete fixing bug 17748). [BZ #17748] * include/fenv.h (__feholdexcept): Declare. Use libm_hidden_proto. * math/feholdexcpt.c (feholdexcept): Rename to __feholdexcept and define as weak alias of __feholdexcept. Use libm_hidden_weak. * sysdeps/aarch64/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/alpha/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/arm/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/hppa/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/i386/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/ia64/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/m68k/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/mips/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/powerpc/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/s390/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/sh/sh4/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/sparc/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/x86_64/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/generic/math_private.h (default_libc_feholdexcept): Use __feholdexcept instead of feholdexcept. (default_libc_feholdexcept_setround): Likewise.
* | 2015-01-05 Steve Ellcey <sellcey@imgtec.com>Steve Ellcey2015-01-051-0/+58
|/ | | | | * sysdeps/mips/memset.S (memset): Modify for mips32r6/mips64r6 to avoid using stl/str to align destination.
* 2015-01-05 Steve Ellcey <sellcey@imgtec.com>Steve Ellcey2015-01-051-13/+164
| | | | * sysdeps/mips/memcpy.S: Add support for mips32r6/mips64r6.
* Fix MIPS n64 posix_fadvise namespace (bug 17796).Joseph Myers2015-01-051-1/+1
| | | | | | | | | | | | | | | | sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c defines posix_fadvise64 as a strong alias for posix_fadvise (for !SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3) - i.e., for static linking, which is the case when this matters), but it should be a weak alias. This patch makes it a weak alias. Tested for MIPS that this fixes the observed linknamespace test failures. [BZ #17796] * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c [!SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)] (posix_fadvise64): Define as weak alias not strong alias.
* 2015-01-05 Steve Ellcey <sellcey@imgtec.com>Steve Ellcey2015-01-051-3/+16
| | | | | | * sysdeps/mips/dl-machine.h (elf_machine_load_address): Replace bltzal with addiupc. (RTLD_START): Ditto.
* tile: check error properly for vDSO callsChris Metcalf2015-01-053-6/+20
| | | | | | | | The tile vDSO vsyscalls were not properly setting the error value. Conventionally, tile returns the same "non-negative success, negative errno" value that x86 does (in r0), but it also returns "zero or positive errno" in r1, which is what the regular syscall code checks. This change uses that convention for the vDSO calls as well.
* lround: provide cast for wordsize-64 version if neededChris Metcalf2015-01-053-6/+30
| | | | | | | | | Platforms with 64-bit registers where 32-bit values need to have the high 32 bits set in a particular way need to have an explicit cast when using the 64-bit sysdeps/ieee754/dbl-64/wordsize-64 version of llround() as lround(). This includes tilegx32, and likely MIPS. x32 does not need this, and AArch64 ILP32 will not either. Require it to be specified in sysdep.h to be explicit.
* Fix ARM posix_fadvise64 namespace (bug 17793).Joseph Myers2015-01-051-1/+1
| | | | | | | | | | | | | | ARM posix_fadvise calls __posix_fadvise64_l64, to which posix_fadvise64 is a strong alias, but posix_fadvise is a POSIX function and posix_fadvise64 isn't. This patch changes it into a weak alias. Tested for ARM that this fixes the corresponding linknamespace test failures. [BZ #17793] * sysdeps/unix/sysv/linux/arm/posix_fadvise64.c (posix_fadvise64): Define as weak alias not strong alias.
* Fix wordsize-64 posix_fadvise64, posix_fallocate64 namespace (bug 17777).Joseph Myers2015-01-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | On systems using sysdeps/unix/sysv/linux/wordsize-64, posix_fadvise64 and posix_fallocate64 (non-POSIX) are strong aliases for posix_fadvise and posix_fallocate (POSIX), meaning references to the latter wrongly bring in definitions of the former. They should be weak aliases; this patch makes them so. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17777] * sysdeps/unix/sysv/linux/wordsize-64/posix_fadvise.c (posix_fadvise64): Define as weak alias not strong alias. * sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c (posix_fallocate64): Likewise. * conform/Makefile (test-xfail-XOPEN2K/fcntl.h/linknamespace): Remove variable. (test-xfail-XOPEN2K/mqueue.h/linknamespace): Likewise. (test-xfail-POSIX2008/fcntl.h/linknamespace): Likewise. (test-xfail-POSIX2008/mqueue.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fcntl.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/mqueue.h/linknamespace): Likewise.
* Fix MIPS variable PAGE_SIZE bug (16191)Matthew Fortune2015-01-051-9/+0
| | | | | | | | | | | | | | | | MIPS supports a variable page size but glibc defines a constant. This causes at least two glibc tests to fail when the page size does not match the hard-coded size: inet/test-ifaddrs inet/test_ifindex [BZ #16191] * NEWS: Mention bug fix. * sysdeps/unix/sysv/linux/mips/sys/user.h (PAGE_SHIFT): Remove. (PAGE_SIZE, PAGE_MASK, NBPG, UPAGES): Likewise. (HOST_TEXT_START_ADDR, HOST_DATA_START_ADDR): Likewise. (HOST_STACK_END_ADDR): Likewise.
* Fix libm fegetround namespace (bug 17748).Joseph Myers2015-01-0217-34/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the fixes for C90 libm functions calling C99 fe* functions, this patch fixes the case of fegetround by making it a weak alias of __fegetround and making the affected code call __fegetround. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). Also tested for ARM (soft-float) that fegetround failures disappear from the linknamespace test failures (feholdexcept, fesetenv, fesetround and feupdateenv remain to be addressed before bug 17748 is fully fixed, although this patch may suffice to fix the failures in some cases, when the libc_fe* functions are implemented but there is no architecture-specific sqrt implementation in use so there were failures from fegetround used by sqrt but no other such failures). [BZ #17748] * include/fenv.h (__fegetround): Declare. Use libm_hidden_proto. * math/fegetround.c (fegetround): Rename to __fegetround and define as weak alias of __fegetround. Use libm_hidden_weak. * sysdeps/aarch64/fpu/fegetround.c (fegetround): Likewise. * sysdeps/alpha/fpu/fegetround.c (fegetround): Likewise. * sysdeps/arm/fegetround.c (fegetround): Likewise. * sysdeps/hppa/fpu/fegetround.c (fegetround): Likewise. * sysdeps/i386/fpu/fegetround.c (fegetround): Likewise. * sysdeps/ia64/fpu/fegetround.c (fegetround): Likewise. * sysdeps/m68k/fpu/fegetround.c (fegetround): Likewise. * sysdeps/mips/fpu/fegetround.c (fegetround): Likewise. * sysdeps/powerpc/fpu/fegetround.c (fegetround): Likewise. Undefine after rather than before function definition; use parentheses around function name in definition. (__fegetround): Also undefine macro after function definition. * sysdeps/powerpc/nofpu/fegetround.c (fegetround): Rename to __fegetround and define as weak alias of __fegetround. Use libm_hidden_weak. Do not undefine as macro. * sysdeps/powerpc/powerpc32/e500/nofpu/fegetround.c (fegetround): Likewise. * sysdeps/s390/fpu/fegetround.c (fegetround): Rename to __fegetround and define as weak alias of __fegetround. Use libm_hidden_weak. * sysdeps/sh/sh4/fpu/fegetround.c (fegetround): Likewise. * sysdeps/sparc/fpu/fegetround.c (fegetround): Likewise. * sysdeps/tile/math_private.h (__fegetround): New inline function. * sysdeps/x86_64/fpu/fegetround.c (fegetround): Rename to __fegetround and define as weak alias of __fegetround. Use libm_hidden_weak. * sysdeps/ieee754/dbl-64/e_sqrt.c (__ieee754_sqrt): Use __fegetround instead of fegetround.
* Fix MIPS TIOCSER_TEMT namespace (bug 17782).Joseph Myers2015-01-021-1/+3
| | | | | | | | | | | | sysdeps/unix/sysv/linux/mips/bits/termios.h defines TIOCSER_TEMT unconditionally, but it's in the user's namespace. This patch conditions it on __USE_MISC, as on powerpc. I've filed bug 17783 for the residual inconsistency in conditions on this macro (sparc defines it for __USE_GNU only). [BZ #17782] * sysdeps/unix/sysv/linux/mips/bits/termios.h (TIOCSER_TEMT): Condition macro definition on [__USE_MISC].
* Fix MIPS sa_flags type (bug 17781).Joseph Myers2015-01-021-1/+1
| | | | | | | | | | | sysdeps/unix/sysv/linux/mips/bits/sigaction.h gives sa_flags type unsigned int, but POSIX says it should be signed int. This patch gives it the correct type (the layout is unchanged, so there are no ABI issues involved). [BZ #17781] * sysdeps/unix/sysv/linux/mips/bits/sigaction.h (struct sigaction): Change type of sa_flags field to int.
* Fix MIPS bits/fcntl.h namespace (bug 17780).Joseph Myers2015-01-021-1/+1
| | | | | | | | | | | sysdeps/unix/sysv/linux/mips/bits/fcntl.h has a structure field called pad, which is in the user's namespace. This patch changes it to __glibc_reserved0. [BZ #17780] * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (struct flock) [!__USE_FILE_OFFSET64 && _MIPS_SIM != _ABI64]: Rename pad field to __glibc_reserved0.
* Update copyright dates not handled by scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've updated copyright dates in glibc for 2015. This is the patch for the changes not generated by scripts/update-copyrights and subsequent build / regeneration of generated files. Apart from the files updated last time (of which sotruss.ksh had moved to sotruss.sh during the year) this also updates nptl/version.c (missed from 2006 until October) and sysdeps/unix/sysv/linux/lddlibc4.c (missed since 2009). * NEWS: Update copyright dates. * catgets/gencat.c (print_version): Likewise. * csu/version.c (banner): Likewise. * debug/catchsegv.sh: Likewise. * debug/pcprofiledump.c (print_version): Likewise. * debug/xtrace.sh (do_version): Likewise. * elf/ldconfig.c (print_version): Likewise. * elf/ldd.bash.in: Likewise. * elf/pldd.c (print_version): Likewise. * elf/sotruss.sh: Likewise. * elf/sprof.c (print_version): Likewise. * iconv/iconv_prog.c (print_version): Likewise. * iconv/iconvconfig.c (print_version): Likewise. * locale/programs/locale.c (print_version): Likewise. * locale/programs/localedef.c (print_version): Likewise. * login/programs/pt_chown.c (print_version): Likewise. * malloc/memusage.sh (do_version): Likewise. * malloc/memusagestat.c (print_version): Likewise. * malloc/mtrace.pl: Likewise. * manual/libc.texinfo: Likewise. * nptl/version.c (banner): Likewise. * nscd/nscd.c (print_version): Likewise. * nss/getent.c (print_version): Likewise. * nss/makedb.c (print_version): Likewise. * posix/getconf.c (main): Likewise. * scripts/test-installation.pl: Likewise. * sysdeps/unix/sysv/linux/lddlibc4.c (main): Likewise.
* ARM: Remove configure check for binutils 2.21 for ARMv7Will Newton2015-01-022-84/+0
| | | | | | | | | | | | The default required version of binutils has been increased to 2.22 making this check redundant. ChangeLog: 2015-01-02 Will Newton <will.newton@linaro.org> * sysdeps/arm/armv7/configure: Removed. * sysdeps/arm/armv7/configure.ac: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-024747-4747/+4747
|
* Fix libm fegetenv namespace (bug 17748).Joseph Myers2014-12-3117-18/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some C90 libm functions call fegetenv via libc_feholdsetround* functions in math_private.h. This patch makes them call __fegetenv instead, making fegetenv into a weak alias for __fegetenv as needed. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). Also tested for ARM (soft-float) that fegetenv failures disappear from the linknamespace test failures (however, similar fixes will also be needed for fegetround, feholdexcept, fesetenv, fesetround and feupdateenv before this set of namespace issues covered by bug 17748 is fully fixed and those linknamespace tests start passing). [BZ #17748] * include/fenv.h (__fegetenv): Use libm_hidden_proto. * math/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/aarch64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/alpha/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/arm/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/hppa/fpu/fegetenv.c (fegetenv): Likewise. * sysdeps/i386/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/ia64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/m68k/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/mips/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/powerpc/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/powerpc/nofpu/fegetenv.c (__fegetenv): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/fegetenv.c (__fegetenv): Likewise. * sysdeps/s390/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/sh/sh4/fpu/fegetenv.c (fegetenv): Likewise. * sysdeps/sparc/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/tile/math_private.h (__fegetenv): New inline function. * sysdeps/x86_64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/generic/math_private.h (libc_feholdsetround_ctx): Use __fegetenv instead of fegetenv. (libc_feholdsetround_noex_ctx): Likewise.
* Add support for MIPS O32 FPXX and .MIPS.abiflagsMatthew Fortune2014-12-3117-1/+1912
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf/elf.h (PT_MIPS_ABIFLAGS): Define. (Elf_MIPS_ABIFlags_v0): New structure. (EF_MIPS_FP64): Define. (MIPS_AFL_REG_NONE, MIPS_AFL_REG_32, MIPS_AFL_REG_64): Likewise. (MIPS_AFL_REG_128, MIPS_AFL_ASE_DSP, MIPS_AFL_ASE_DSP64): Likewise. (MIPS_AFL_ASE_DSPR2, MIPS_AFL_ASE_EVA, MIPS_AFL_ASE_MCU): Likewise. (MIPS_AFL_ASE_MDMX, MIPS_AFL_ASE_MIPS3D, MIPS_AFL_ASE_MT): Likewise. (MIPS_AFL_ASE_SMARTMIPS, MIPS_AFL_ASE_VIRT): Likewise. (MIPS_AFL_ASE_VIRT64, MIPS_AFL_ASE_MSA, MIPS_AFL_ASE_MSA64): Likewise. (MIPS_AFL_ASE_MIPS16, MIPS_AFL_ASE_MICROMIPS): Likewise. (MIPS_AFL_ASE_XPA, MIPS_AFL_EXT_XLR, MIPS_AFL_EXT_OCTEON2): Likewise. (MIPS_AFL_EXT_OCTEONP, MIPS_AFL_EXT_LOONGSON_3A): Likewise. (MIPS_AFL_EXT_OCTEON, MIPS_AFL_EXT_5900, MIPS_AFL_EXT_4010): Likewise. (MIPS_AFL_EXT_4100, MIPS_AFL_EXT_3900, MIPS_AFL_EXT_10000): Likewise. (MIPS_AFL_EXT_SB1, MIPS_AFL_EXT_4111, MIPS_AFL_EXT_4120): Likewise. (MIPS_AFL_EXT_5400, MIPS_AFL_EXT_5500): Likewise. (MIPS_AFL_EXT_LOONGSON_2E, MIPS_AFL_EXT_LOONGSON_2F): Likewise. (Val_GNU_MIPS_ABI_FP_ANY, Val_GNU_MIPS_ABI_FP_DOUBLE): New enum values. (Val_GNU_MIPS_ABI_FP_SINGLE, Val_GNU_MIPS_ABI_FP_SOFT): Likewise. (Val_GNU_MIPS_ABI_FP_OLD_64, Val_GNU_MIPS_ABI_FP_XX): Likewise. (Val_GNU_MIPS_ABI_FP_64, Val_GNU_MIPS_ABI_FP_64A): Likewise. (Val_GNU_MIPS_ABI_FP_MAX): Likewise. * sysdeps/mips/Makefile [subdir=elf]: Add tst-abi-interlink, tst-mode-switch-1, tst-mode-switch-2, tst-mode-switch-3 tests. * sysdeps/mips/bits/linkmap.h (struct link_map_machine): Add fpmode field. * sysdeps/mips/dl-machine.h (elf_machine_matches_host): Reject EF_MIPS_FP64. * sysdeps/mips/dl-machine-reject-phdr.h: New file. * sysdeps/mips/tst-abi-fp32mod.c: Likewise. * sysdeps/mips/tst-abi-fpxxmod.c: Likewise. * sysdeps/mips/tst-abi-fpxxomod.c: Likewise. * sysdeps/mips/tst-abi-fp64mod.c: Likewise. * sysdeps/mips/tst-abi-fp64amod.c: Likewise. * sysdeps/mips/tst-abi-interlink.c: Likewise. * sysdeps/mips/tst-mode-switch-1.c: Likewise. * sysdeps/mips/tst-mode-switch-2.c: Likewise. * sysdeps/mips/tst-mode-switch-3.c: Likewise. * sysdeps/unix/sysv/linux/mips/configure.ac (o32-fpabi): Define to record the current FP ABI extension. (mips-mode-switch): Define to show if kernel headers support mode switching. * sysdeps/unix/sysv/linux/mips/configure: Regenerate. * sysdeps/unix/sysv/linux/mips/ldsodefs.h: Increase maximum supported SYSV ABI version to 3. * sysdeps/unix/sysv/linux/mips/libc-abis: Add new MIPS_O32_FP64 feature.
* powerpc: POWER7 strcpy optimization for unaligned stringsRajalakshmi Srinivasaraghavan2014-12-311-82/+245
| | | | | | | | | | | | | | | | This patch optimizes strcpy for ppc64/power7 for unaligned source or destination address. The source or destination address is aligned to doubleword and data is shifted based on the alignment and added with the previous loaded data to be written as a doubleword. For each load, cmpb instruction is used for faster null check. The word aligned optimization is also removed, since the new unaligned code path shows better results handling word-aligned strings. More combination of unaligned inputs is also added in benchtest to measure the improvement.The new optimization shows 2 to 80% of performance improvement for longer string though it does not show big difference on string size less than 16 due to additional checks.
* Clean up powerpc fegetround / __fegetround inlines.Joseph Myers2014-12-319-56/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The natural fix for some linknamespace test failures, where C90 libm functions call C99 <fenv.h> functions, is to make fe* into weak aliases for __fe* and call __fe* from within libm as needed. To do this, the __fe* names need to be available for that purpose - that is, they must not be used for something other than aliases of fe*. On powerpc, however, __fegetround is an inline function in fenv_libc.h, with no corresponding fegetround inline function; fegetround has an equivalent macro expansion in bits/fenvinline.h, but that is disabled if __NO_MATH_INLINES (which is defined for building libm). I see no need for that disabling; it's not even clear that __NO_MATH_INLINES should affect <fenv.h>, and the results of fegetround are completely defined so there is no semantic effect of that disabling at all outside glibc. The x86 inline feraiseexcept is conditioned on __USE_EXTERN_INLINES not __NO_MATH_INLINES (but that's an inline function rather than a macro). This patch removes the __NO_MATH_INLINES conditional on that fegetround macro, so resulting in it being expanded inline inside glibc. In turn, this means that direct calls to __fegetround from C99 functions in ldbl-128ibm can be changed to calls to fegetround, so that nofpu fenv_libc.h files don't need to define __fegetround at all and, by changing ldbl-128ibm files to use <fenv.h> not <fenv_libc.h>, non-e500 nofpu no longer needs an fenv_libc.h file. The other macros in fenvinline.h are left conditional on __NO_MATH_INLINES, although since the only case where this should make a difference is one involving undefined behavior (if the argument to the function is not a valid exception macro). The out-of-line definition for fegetround uses __fegetround (the inline function removed by this patch). So this continues to work, the fenvinline.h header is made to define __fegetround, and then to define fegetround to call __fegetround. Tested for powerpc32 (hard float) that installed stripped shared libraries are unchanged by this patch; also tested that powerpc-nofpu build still works. (This patch does not itself fix any bugs; it simply cleans things up in preparation for separate bug fixes.) * sysdeps/powerpc/bits/fenvinline.h (fegetround): Rename macro to __fegetround and redefine to call __fegetround. Remove condition on [!__NO_MATH_INLINES]. * sysdeps/powerpc/fpu/fenv_libc.h (__fegetround): Remove inline function. * sysdeps/powerpc/nofpu/fenv_libc.h: Remove file. * sysdeps/powerpc/powerpc32/e500/nofpu/fenv_libc.h (__fegetround): Remove macro. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: Include <fenv.h> instead of <fenv_libc.h>. (__llrintl): Call fegetround instead of __fegetround. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: Include <fenv.h> instead of <fenv_libc.h>. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: Likewise. (__lrintl): Call fegetround instead of __fegetround. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: Include <fenv.h> instead of <fenv_libc.h>. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: Likewise. (__rintl): Call fegetround instead of __fegetround.
* Don't check PI_STATIC_AND_HIDDEN in i386 dl-machine.hH.J. Lu2014-12-301-33/+0
| | | | | | | | | | PI_STATIC_AND_HIDDEN is always defined for i386. There is no need to check PI_STATIC_AND_HIDDEN in sysdeps/i386/dl-machine.h. [BZ #17775] * sysdeps/i386/dl-machine.h (PI_STATIC_AND_HIDDEN): Removed. (elf_machine_dynamic) [!PI_STATIC_AND_HIDDEN]: Likewise. (elf_machine_load_address) [!PI_STATIC_AND_HIDDEN]: Likewise.
* i386: Fix build by GCC 5.0Andrew Senkevich2014-12-302-4/+6
| | | | | | | | | | | | | | | | | | Fixed 3 "make check" failures on glibc 32bit built by gcc 5.0 due to EBX was enabled for allocation: https://gcc.gnu.org/ml/gcc-patches/2014-10/msg00892.html Tests elf/tst-tls3, elf/tst-execstack-needed, elf/tst-execstack-prog were failed because EBX was used as PIC register. * sysdeps/i386/tls-macros.h: Include <features.h>. (TLS_LE): Use non-PIC version for GCC >= 5.0. (TLS_IE): Likewise. (TLS_LD): Likewise. (TLS_GD): Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h (check_consistency): Don't define for GCC >= 5.0.
* Fix libm feraiseexcept namespace (bug 17723).Joseph Myers2014-12-3031-56/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various C90 and UNIX98 libm functions call feraiseexcept, which is not in those standards. This causes linknamespace test failures - except on x86 / x86_64, where feraiseexcept is inline (for the relevant constant arguments) in bits/fenv.h. This patch fixes this by making those functions call __feraiseexcept instead. All changes are applied to all architectures rather than considering the possibility that some might not be needed in some cases (e.g. x86) as it seems most maintainable to keep architectures consistent. Where __feraiseexcept does not exist, it is added, with feraiseexcept made a weak alias; where it is a strong alias, it is made weak. libm_hidden_def / libm_hidden_proto are used with __feraiseexcept (this might in some cases improve code generation for existing calls to __feraiseexcept in some code on some architectures). Where there are dummy feraiseexcept macros (on architectures without floating-point exceptions support, to avoid compile errors from references to undefined FE_* macros), corresponding dummy __feraiseexcept macros are added. And on x86, to ensure __feraiseexcept calls still get inlined, the inline function in bits/fenv.h is refactored so that most of it can be reused in an inline __feraiseexcept in a separate include/bits/fenv.h. Calls are changed in C90/UNIX98 functions, but generally not in functions missing from those standards. They are also changed in libc_fe* functions (on the basis that those might be used in any libm function), and in feupdateenv (on the same basis - may be used, via default libc_*, in any libm function - of course feupdateenv will need changing to __feupdateenv in a subsequent patch to make that fully namespace-clean). No __feraiseexcept is added corresponding to the feraiseexcept in powerpc bits/fenvinline.h, because that macro definition is conditional on !defined __NO_MATH_INLINES, and glibc libm is built with -D__NO_MATH_INLINES, so changing internal calls to use __feraiseexcept should make no difference. Tested for x86_64 (testsuite; the only change in disassembly of installed shared libraries is a slight code reordering in clog10, of no apparent significance). Also tested for MIPS, where (in the configuration tested) it eliminates math.h linknamespace failures for n32 and n64 (some for o32 remain because of other issues). [BZ #17723] * include/fenv.h (__feraiseexcept): Use libm_hidden_proto. * math/fraiseexcpt.c (__feraiseexcept): Use libm_hidden_def. * sysdeps/aarch64/fpu/fraiseexcpt.c (feraiseexcept): Rename to __feraiseexcept and define as weak alias of __feraiseexcept. Use libm_hidden_weak. * sysdeps/arm/fraiseexcpt.c (feraiseexcept): Likewise. * sysdeps/hppa/fpu/fraiseexcpt.c (feraiseexcept): Likewise. * sysdeps/i386/fpu/fraiseexcpt.c (__feraiseexcept): Use libm_hidden_def. * sysdeps/ia64/fpu/fraiseexcpt.c (feraiseexcept): Rename to __feraiseexcept and define as weak alias of __feraiseexcept. Use libm_hidden_weak. * sysdeps/m68k/coldfire/fpu/fraiseexcpt.c (feraiseexcept): Likewise. * sysdeps/microblaze/math_private.h (__feraiseexcept): New macro. * sysdeps/mips/fpu/fraiseexcpt.c (feraiseexcept): Rename to __feraiseexcept and define as weak alias of __feraiseexcept. Use libm_hidden_weak. * sysdeps/powerpc/fpu/fraiseexcpt.c (__feraiseexcept): Use libm_hidden_def. * sysdeps/powerpc/nofpu/fraiseexcpt.c (__feraiseexcept): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/fraiseexcpt.c (__feraiseexcept): Likewise. * sysdeps/s390/fpu/fraiseexcpt.c (feraiseexcept): Rename to __feraiseexcept and define as weak alias of __feraiseexcept. Use libm_hidden_weak. * sysdeps/sh/sh4/fpu/fraiseexcpt.c (feraiseexcept): Likewise. * sysdeps/sparc/fpu/fraiseexcpt.c (__feraiseexcept): Use libm_hidden_def. * sysdeps/tile/math_private.h (__feraiseexcept): New macro. * sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S (__feraiseexcept): Use libm_hidden_def. * sysdeps/x86_64/fpu/fraiseexcpt.c (__feraiseexcept): Use libm_hidden_def. (feraiseexcept): Define as weak not strong alias. Use libm_hidden_weak. * sysdeps/x86/fpu/bits/fenv.h (__feraiseexcept_invalid_divbyzero): New inline function. Factored out of ... (feraiseexcept): ... here. Use __feraiseexcept_invalid_divbyzero. * sysdeps/x86/fpu/include/bits/fenv.h: New file. * math/e_scalb.c (invalid_fn): Call __feraiseexcept instead of feraiseexcept. * math/w_acos.c (__acos): Likewise. * math/w_asin.c (__asin): Likewise. * math/w_ilogb.c (__ilogb): Likewise. * math/w_j0.c (y0): Likewise. * math/w_j1.c (y1): Likewise. * math/w_jn.c (yn): Likewise. * math/w_log.c (__log): Likewise. * math/w_log10.c (__log10): Likewise. * sysdeps/aarch64/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/aarch64/fpu/math_private.h (libc_feupdateenv_test_aarch64): Likewise. * sysdeps/alpha/fpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/arm/fenv_private.h (libc_feupdateenv_test_vfp): Likewise. * sysdeps/arm/feupdateenv.c (feupdateenv): Likewise. * sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/m68k/fpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/powerpc/fpu/e_sqrt.c (__slow_ieee754_sqrt): Likewise. * sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/sparc/fpu/feupdateenv.c (__feupdateenv): Likewise.
* Replace %ld with %jd and cast to intmax_tH.J. Lu2014-12-301-4/+4
|
* i386: memcpy functions with SSE2 unaligned load/storeAndrew Senkevich2014-12-3013-3/+769
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These new memcpy functions are the 32-bit version of x86_64 SSE2 unaligned memcpy. Memcpy average performace benefit is 18% on Silvermont, other platforms also improved about 35%, benchmarked on Silvermont, Haswell, Ivy Bridge, Sandy Bridge and Westmere, performance results attached in https://sourceware.org/ml/libc-alpha/2014-07/msg00157.html * sysdeps/i386/i686/multiarch/bcopy-sse2-unaligned.S: New file. * sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S: Likewise. * sysdeps/i386/i686/multiarch/memmove-sse2-unaligned.S: Likewise. * sysdeps/i386/i686/multiarch/mempcpy-sse2-unaligned.S: Likewise. * sysdeps/i386/i686/multiarch/bcopy.S: Select the sse2_unaligned version if bit_Fast_Unaligned_Load is set. * sysdeps/i386/i686/multiarch/memcpy.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy_chk.S: Likewise. * sysdeps/i386/i686/multiarch/memmove.S: Likewise. * sysdeps/i386/i686/multiarch/memmove_chk.S: Likewise. * sysdeps/i386/i686/multiarch/mempcpy.S: Likewise. * sysdeps/i386/i686/multiarch/mempcpy_chk.S: Likewise. * sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add bcopy-sse2-unaligned, memcpy-sse2-unaligned, memmove-sse2-unaligned and mempcpy-sse2-unaligned. * sysdeps/i386/i686/multiarch/ifunc-impl-list.c (MAX_IFUNC): Set to 4. (__libc_ifunc_impl_list): Test __bcopy_sse2_unaligned, __memmove_chk_sse2_unaligned, __memmove_sse2_unaligned, __memcpy_chk_sse2_unaligned, __memcpy_sse2_unaligned, __mempcpy_chk_sse2_unaligned, and __mempcpy_sse2_unaligned.
* Fix a couple of -Wundef warnings.Chris Metcalf2014-12-291-1/+1
|
* tile: prefer inlines to macros in math_private.h.Chris Metcalf2014-12-291-4/+6
|
* Use posix-conf-vars.list to generate spec arraySiddhesh Poyarekar2014-12-291-1/+1
| | | | | | | | | | | | | | | | | | This patch adds support to generate the spec array in getconf from the conf.list. The generated code is mostly unchanged. the only changes are due to the change in layout of the spec and val arrays in the ELF. The val array can also be auto-generated from posix-conf-vars.list once the remaining macros are added to it. * posix/posix-conf-vars.list (SPEC:XBS5): Add sysconf prefix. * posix/confstr.c: Define NEED_SPEC_ARRAY to 0. * posix/posix-envs.def: Likewise. * sysdeps/posix/sysconf.c: Likewise. * posix/getconf.c: Define NEED_SPEC_ARRAY to 1. (specs): Remove array. * scripts/gen-posix-conf-vars.awk: Support generation of specs array.
* Add _POSIX namespace SYSCONF macros to posix-conf-vars.listSiddhesh Poyarekar2014-12-291-78/+80
| | | | | | | | This fixes the remaining -Wundef warnings. Tested on x86_64. * posix/posix-conf-vars.list: Add _POSIX sysconf namespace. * sysdeps/posix/sysconf.c: Include posix-conf-vars.h. (__sysconf): Use CONF_IS_* macros.
* tile: add no-op fe*() routines for libc internal useChris Metcalf2014-12-261-0/+4
| | | | | | | | | These avoid having tile generate real calls to the no-op functions, which then causes linknamespace test failures. It might make sense to factor all of these out into a common header that can be shared by tile, microblaze, etc., but for now just fix the test failures.
* linux/clock_settime: remove unnecessary vDSO definitionsChris Metcalf2014-12-261-9/+0
| | | | | | | | | | | | These definitions were added back before __ASSUME_POSIX_CPU_TIMERS was removed. There used to be a vsyscall to clock_getres() in maybe_syscall_settime_cpu(), but that function was removed in commit 26889eac. The presence of the vsyscall definitions means that platforms that don't provide clock_getres as a vsyscall hit a symbol redefinition warning in this file, becoming fatal with -Werror. Removing the vsyscall definitions is the obvious fix. No change to generated code on x86_64.
* tilegx: fix sysdep.h to avoid a redefinition warningChris Metcalf2014-12-261-3/+3
| | | | | | | | The symbol for HAVE_CLOCK_GETTIME_VSYSCALL was being only conditionally defined under [SHARED]. However, it turns out this causes a preprocessor symbol redefinition warning when building clock_gettime.o. Move the symbol definition down to make it unconditional, like other platforms do.
* tilegx32: avoid a a -Werror warning from unwindingChris Metcalf2014-12-261-1/+1
| | | | | | | The _Unwind_GetCFA() routine returns a 64-bit value, which we interpret as a pointer. Add an intermediate cast to long so that in ILP32 mode we don't get a warning about casting a wrong-sized integer to a pointer.
* tilegx: enable wordsize-64 support for ieee745 dbl-64.Chris Metcalf2014-12-231-0/+1
| | | | | | I missed this during the initial port. Some testing shows that enabling this mode does, unsurprisingly, yield some nice speedups on the math functions in question.
* Make __ASSUME_UTIMES hppa-specific.Joseph Myers2014-12-226-44/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes __ASSUME_UTIMES hppa-specific, removing mentions of the macro from architecture-independent code and code for other architectures. (All other architectures either have the utimes syscall in all relevant kernel versions, or use the asm-generic interface so only have utimensat and won't get the utimes syscall.) A similar approach is used to that used for futimesat for MicroBlaze: if the kernel is recent enough that the utimes syscall can be assumed to be present, use the implementation in terms of the utimes syscall, and otherwise use the linux/generic implementation in terms of utimensat. Tested x86_64 that the disassembly of installed shared libraries is unchanged by the patch. Not tested for hppa. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_UTIMES): Do not define. * sysdeps/unix/sysv/linux/utimes.c: Do not include <kernel-features.h>. (__utimes) [__NR_utimes]: Make code unconditional. (__utimes) [!__ASSUME_UTIMES]: Remove conditional code. * sysdeps/unix/sysv/linux/aarch64/kernel-features.h (__ASSUME_UTIMES): Do not undefine. * sysdeps/unix/sysv/linux/tile/kernel-features.h (__ASSUME_UTIMES): Likewise. * sysdeps/unix/sysv/linux/hppa/kernel-features.h (__ASSUME_UTIMES): Define for [__LINUX_KERNEL_VERSION >= 0x030e00] instead of undefining for [__LINUX_KERNEL_VERSION < 0x030e00]. * sysdeps/unix/sysv/linux/hppa/utimes.c: New file.
* Fix preprocessor indentation in sysdeps/mips/memcpy.S.Steve Ellcey2014-12-221-97/+97
| | | | Checked in as obvious.
* tilegx: remove implicit boolean conversion in strstr.Chris Metcalf2014-12-221-1/+1
| | | | | | | | [BZ #17746] The __builtin_expect() truncated a uint64_t to a 32-bit long in ILP32 mode, discarding the high 32 bits, and potentially missing the NUL terminator that we were searching for with SIMD operations. Explicitly compare to zero to fix the problem.