aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-01-30Add memcpy-rte-ssse3.chjl/memcpy/dpdk/masterH.J. Lu3-1/+10
2015-01-30Add memcpy-rte-avx.cH.J. Lu4-4/+16
Don't inline rte_memcpy.
2015-01-30Import rte_memcpy.hH.J. Lu1-0/+635
rte_memcpy.h is a memcpy implementation from DPDK: http://dpdk.org/ optimized for Sandy Bridge and Haswell. See http://dpdk.org/ml/archives/dev/2014-November/008158.html The original code is at https://gist.github.com/lukego/efc82a15bde5ec83cb1b
2015-01-30Use AVX unaligned memcpy only if AVX2 is availableH.J. Lu9-8/+35
memcpy with unaligned 256-bit AVX register loads/stores are slow on older processorsl like Sandy Bridge. This patch adds bit_AVX_Fast_Unaligned_Load and sets it only when AVX2 is available. [BZ #17801] * sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): Set the bit_AVX_Fast_Unaligned_Load bit for AVX2. * sysdeps/x86_64/multiarch/init-arch.h (bit_AVX_Fast_Unaligned_Load): New. (index_AVX_Fast_Unaligned_Load): Likewise. (HAS_AVX_FAST_UNALIGNED_LOAD): Likewise. * sysdeps/x86_64/multiarch/memcpy.S (__new_memcpy): Check the bit_AVX_Fast_Unaligned_Load bit instead of the bit_AVX_Usable bit. * sysdeps/x86_64/multiarch/memcpy_chk.S (__memcpy_chk): Likewise. * sysdeps/x86_64/multiarch/mempcpy.S (__mempcpy): Likewise. * sysdeps/x86_64/multiarch/mempcpy_chk.S (__mempcpy_chk): Likewise. * sysdeps/x86_64/multiarch/memmove.c (__libc_memmove): Replace HAS_AVX with HAS_AVX_FAST_UNALIGNED_LOAD. * sysdeps/x86_64/multiarch/memmove_chk.c (__memmove_chk): Likewise.
2015-01-30Support compilers defaulting to PIEH.J. Lu4-0/+40
If PIE is the default, we need to build programs as PIE. * Makeconfig (+link): Set to $(+link-pie) if default to PIE. (+link-tests): Set to $(+link-pie-tests) if default to PIE. * config.make.in (build-pie-default): New. * configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE is default. AC_SUBST. * configure: Regenerated.
2015-01-30Compile gcrt1.o with -fPICH.J. Lu1-2/+11
We compile gcrt1.o with -fPIC to support both "gcc -pg" and "gcc -pie -pg". [BZ #17836] * csu/Makefile (extra-objs): Add gmon-start.o if not builing shared library. Add gmon-start.os otherwise. ($(objpfx)g$(start-installed-name)): Use $(objpfx)S% $(objpfx)gmon-start.os if builing shared library. ($(objpfx)g$(static-start-installed-name)): Likewise.
2015-01-30Compile vismain with -fPIC and link with -pieH.J. Lu1-1/+4
2015-01-29Include <signal.h> in sysdeps/nptl/allocrtsig.cAndreas Schwab2-0/+5
Architectures which don't use hp-timing-common.h don't include <signal.h> via <sys/param.h>.
2015-01-29Fix up ChangeLog formattingSiddhesh Poyarekar1-12/+12
2015-01-29Initialize nscd stats data [BZ #17892]Siddhesh Poyarekar3-1/+8
The padding bytes in the statsdata struct are not initialized, due to which valgrind throws a warning: ==11384== Memcheck, a memory error detector ==11384== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. ==11384== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==11384== Command: nscd -d ==11384== Fri 25 Apr 2014 10:34:53 AM CEST - 11384: handle_request: request received (Version = 2) from PID 11396 Fri 25 Apr 2014 10:34:53 AM CEST - 11384: GETSTAT ==11384== Thread 6: ==11384== Syscall param socketcall.sendto(msg) points to uninitialised byte(s) ==11384== at 0x4E4ACDC: send (in /lib64/libpthread-2.12.so) ==11384== by 0x11AF6B: send_stats (in /usr/sbin/nscd) ==11384== by 0x112F75: nscd_run_worker (in /usr/sbin/nscd) ==11384== by 0x4E439D0: start_thread (in /lib64/libpthread-2.12.so) ==11384== by 0x599AB6C: clone (in /lib64/libc-2.12.so) ==11384== Address 0x15708395 is on thread 6's stack Fix the warning by initializing the structure.
2015-01-28Clarify math/README.libm-test. Add "How to read the test output."Martin Sebor2-14/+71
2015-01-28tilegx32: set __HAVE_64B_ATOMICS to 0Chris Metcalf2-1/+14
This is because of alignment issues in the sem_t support. tilegx32 does in fact support 64-bit atomics and we will need to revisit this after the 2.21 freeze.
2015-01-28Disable 64-bit atomics for MIPS n32.Joseph Myers2-1/+6
This patch disables use of 64-bit atomics for MIPS n32 to fix the problems with unaligned semaphores. Before 64-bit atomics are used for anything for which such alignment issues do not arise, and before the addition of any new ILP32 ports with 64-bit semaphores for which the ABI can be set to have the greater alignment (AARCH64?), a better approach will need to be established that allows architectures to declare their 64-bit atomics availability accurately, without doing so causing inappropriate use of such atomics on unaligned semaphores. Tested for MIPS n32 that this fixes the nptl/tst-sem3 failure. * sysdeps/mips/bits/atomic.h [_MIPS_SIM == _ABIN32] (__HAVE_64B_ATOMICS): Define to 0.
2015-01-28powerpc: Fix fesetexceptflag [BZ#17885]Adhemerval Zanella3-2/+6
This patch fixes a bug introduced by 18f2945ae9216cfc, where it optimizes the FPSCR set by just issuing a mtfs instruction if new flag is different from older one. The issue is a typo, where the new flag should the the new value, instead of the old one. It fixes BZ#17885.
2015-01-28powerpc: Fix fsqrt build in libm [BZ#16576]Adhemerval Zanella7-111/+50
Some powerpc64 processors (e5500 core for instance) does not provide the fsqrt instruction, however current check to use in math_private.h is __WORDSIZE and _ARCH_PWR4 (ISA 2.02). This is patch change it to use the compiler flag _ARCH_PPCSQ (which is the same condition GCC uses to decide whether to generate fsqrt instruction). It fixes BZ#16576.
2015-01-27iconv: Suppress array out of bounds warning.Andreas Krebbel2-1/+12
2015-01-25ia64: avoid set-but-not-used warningAndreas Schwab2-0/+8
2015-01-25m68k/coldfire: avoid warning about volatile register variablesAndreas Schwab2-10/+13
2015-01-25m68k: fix missing definition of __feraiseexceptAndreas Schwab2-0/+4
2015-01-25m68k: force inlining bswap functionsAndreas Schwab2-4/+9
2015-01-25Fix segmentation fault when LD_LIBRARY_PATH contains only non-existings pathsBram3-12/+18
2015-01-24powerpc: Fix powerpc64 build failure with binutils 2.22Adhemerval Zanella3-2/+9
GLIBC memset optimization for POWER8 uses the '.machine power8' directive, which is only supported officially on binutils 2.24+. This causes a build failure on older binutils. Since the requirement of .machine power8 is to correctly assembly the 'mtvsrd' instruction and it is already handled by the MTVSRD_V1_R4 macro, there is no really needed of using it. The patch replaces the power8 with power7 for .machine directive. It fixes BZ#17869.
2015-01-24powerpc: Fix ifuncmain6pie failure with GCC 4.9Adhemerval Zanella3-2/+10
This patch fix the elf/ifuncmain6pie failure when building with GCC 4.9+. For some reason, the compiler removes the branch taken code at resolve_ifunc (sysdeps/powerpc/powerpc64/dl-machine.h) as dead-code and thus the testcase fails because the ifunc resolves branches to an invalid memory location. It fixes by explicit adding a dependency of value based on odp variable to avoid compiler optimization. It fixes BZ#17868.
2015-01-23Also treat model numbers 0x5a/0x5d as SilvermontH.J. Lu2-1/+4
2015-01-23Treat model numbers 0x4a/0x4d as SilvermontH.J. Lu2-0/+7
* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): Treat model numbers 0x4a/0x4d as Intel Silvermont architecture.
2015-01-23Also use uint64_t in __new_sem_wait_fastH.J. Lu2-1/+2
2015-01-23Use uint64_t and (uint64_t) 1 for 64-bit intH.J. Lu5-8/+20
This patch replaces unsigned long int and 1UL with uint64_t and (uint64_t) 1 to support ILP32 targets like x32. [BZ #17870] * nptl/sem_post.c (__new_sem_post): Replace unsigned long int with uint64_t. * nptl/sem_waitcommon.c (__sem_wait_cleanup): Replace 1UL with (uint64_t) 1. (__new_sem_wait_slow): Replace unsigned long int with uint64_t. Replace 1UL with (uint64_t) 1. * sysdeps/nptl/internaltypes.h (new_sem): Replace unsigned long int with uint64_t.
2015-01-23Add missing libc_hidden_weak to stub if_nameindex, if_freenameindex.Roland McGrath2-0/+5
2015-01-23Add missing libc_hidden_def to stub getrlimit64.Roland McGrath2-0/+5
2015-01-22soft-fp: Use __label__ for all labels within macros.Joseph Myers2-0/+13
soft-fp has various macros containing labels and goto statements. Because label names are function-scoped, this is problematic for using the same macro more than once within a function, which some architectures do in the Linux kernel (the soft-fp version there predates the addition of any of these labels and gotos). This patch fixes this by using __label__ to make the labels local to the block with the __label__ declaration. Tested for powerpc-nofpu that installed stripped shared libraries are unchanged by this patch. * soft-fp/op-common.h (_FP_ADD_INTERNAL): Declare labels with __label__. (_FP_FMA): Likewise. (_FP_TO_INT_ROUND): Likewise. (_FP_FROM_INT): Likewise.
2015-01-21BZ #16418: Fix powerpc get_clockfreq racinessAdhemerval Zanella3-78/+74
This patch fix powerpc __get_clockfreq racy and cancel-safe issues by dropping internal static cache and by using nocancel file operations. The vDSO failure check is also removed, since kernel code does not return an error (it cleans cr0.so bit on function return) and the static code (to read value /proc) now uses non-cancellable calls.
2015-01-21Update copyright year to 2015 for new files.Carlos O'Donell3-3/+6
2015-01-21tst-getpw: Rewrite.Carlos O'Donell2-6/+79
The test is rewritten to look for the testable conditions and exit once they are all detected. This prevents the test from iterating over 2000 UIDs and looking up each one. It speeds up the test and prevents it from failing if the system under test has an NSS-based passwd that is slower than the test timeout. See: https://sourceware.org/ml/libc-alpha/2015-01/msg00394.html
2015-01-21Fix tst_wcscpy.c test.Marek Polacek2-1/+5
2015-01-21Fix recursive dlopen.Carlos O'Donell10-21/+222
The ability to recursively call dlopen is useful for malloc implementations that wish to load other dynamic modules that implement reentrant/AS-safe functions to use in their own implementation. Given that a user malloc implementation may be called by an ongoing dlopen to allocate memory the user malloc implementation interrupts dlopen and if it calls dlopen again that's a reentrant call. This patch fixes the issues with the ld.so.cache mapping and the _r_debug assertion which prevent this from working as expected. See: https://sourceware.org/ml/libc-alpha/2014-12/msg00446.html
2015-01-21Fix semaphore destruction (bug 12674).Carlos O'Donell34-2103/+732
This commit fixes semaphore destruction by either using 64b atomic operations (where available), or by using two separate fields when only 32b atomic operations are available. In the latter case, we keep a conservative estimate of whether there are any waiting threads in one bit of the field that counts the number of available tokens, thus allowing sem_post to atomically both add a token and determine whether it needs to call futex_wake. See: https://sourceware.org/ml/libc-alpha/2014-12/msg00155.html
2015-01-20Regenerate INSTALL.Carlos O'Donell2-231/+230
2015-01-20Update libc.pot:Carlos O'Donell2-238/+242
In preparation for providing a tarball to the translation project. * po/libc.pot: Regenerated.
2015-01-17Commit nios2 port to master.Chung-Lin Tang98-0/+7681
2015-01-16S390: Get rid of linknamespace failures for utmp functions.Stefan Liebler9-15/+62
2015-01-16S390: Get rid of linknamespace failures for string functions.Stefan Liebler16-80/+142
2015-01-14Fix powerpc-nofpu fesetenv namespace (bug 17748).Joseph Myers2-1/+7
When fixing namespace issues for <fenv.h> functions I missed one call to fesetenv for powerpc-nofpu. This patch changes this to a call to __fesetenv. Tested for powerpc-nofpu; it fixes the previously observed math.h linknamespace test failures. [BZ #17748] * sysdeps/powerpc/nofpu/feholdexcpt.c (__feholdexcept): Call __fesetenv instead of fesetenv.
2015-01-14[s390] Define a __tls_get_addr macro to avoid declaring it againSiddhesh Poyarekar2-0/+12
commit 050f7298e1ecc39887c329037575ccd972071255 added an extern declaration for __tls_get_addr that conflicts with the one in s390 dl-tls.h, based on whether __tls_get_addr is defined as a macro. The rationale seems to be based on the assumption that __tls_get_addr is exported for every architecture and hence an internal non-plt alias is needed. This is not true for s390 though, since it exports __tls_get_offset and not __tls_get_addr. This results in tst-audit9 being stuck in an infinite loop. This patch fixes this by defining a __tls_get_addr macro to itself so as to not use the conflicting declaration.
2015-01-13powerpc: Fix POWER7/PPC64 performance regression on LEAdhemerval Zanella2-588/+285
This patch fixes a performance regression on the POWER7/PPC64 memcmp porting for Little Endian. The LE code uses 'ldbrx' instruction to read the memory on byte reversed form, however ISA 2.06 just provide the indexed form which uses a register value as additional index, instead of a fixed value enconded in the instruction. And the port strategy for LE uses r0 index value and update the address value on each compare loop interation. For large compare size values, it adds 8 more instructions plus some more depending of trailing size. This patch fixes it by adding pre-calculate indexes to remove the address update on loops and tailing sizes. For large sizes it shows a considerable gain, with double performance pairing with BE.
2015-01-13powerpc: Optimized strncmp for POWER8/PPC64Adhemerval Zanella7-7/+387
This patch adds an optimized POWER8 strncmp. The implementation focus on speeding up unaligned cases follwing the ideas of power8 strcmp. The algorithm first check the initial 16 bytes, then align the first function source and uses unaligned loads on second argument only. Aditional checks for page boundaries are done for unaligned cases (where sources alignment are different).
2015-01-13powerpc: Optimize POWER7 strcmp trailing checksRajalakshmi Srinivasaraghavan2-114/+89
This patch optimized the POWER7 trailing check by avoiding using byte read operations and instead use the doubleword already readed with bitwise operations.
2015-01-13Fix scanf15.c testsuite build on sparc.David S. Miller2-0/+6
* include/signal.h (__sigreturn): Guard with __USE_MISC.
2015-01-13Remove some references to bcopy/bcmp/bzero.Roland McGrath6-11/+16
2015-01-13powerpc: Optimized strcmp for POWER8/PPC64Adhemerval Zanella7-4/+318
This patch adds an optimized POWER8 strcmp using unaligned accesses. The algorithm first check the initial 16 bytes, then align the first function source and uses unaligned loads on second argument only. Aditional checks for page boundaries are done for unaligned cases
2015-01-13powerpc: Optimized st{r,p}ncpy for POWER8/PPC64Adhemerval Zanella10-7/+559
This patch adds an optimized POWER8 st{r,p}ncpy using unaligned accesses. It shows 10%-80% improvement over the optimized POWER7 one that uses only aligned accesses, specially on unaligned inputs. The algorithm first read and check 16 bytes (if inputs do not cross a 4K page size). The it realign source to 16-bytes and issue a 16 bytes read and compare loop to speedup null byte checks for large strings. Also, different from POWER7 optimization, the null pad is done inline in the implementation using possible unaligned accesses, instead of realying on a memset call. Special case is added for page cross reads.