about summary refs log tree commit diff
path: root/sysdeps/i386/i686/multiarch
Commit message (Collapse)AuthorAgeFilesLines
* i686: Don't include multiarch memove in libc.aH.J. Lu2021-08-301-1/+1
| | | | | On i686, there is no multiarch memove in libc.a, don't include multiarch memove in ifunc-impl-list.c in libc.a.
* Remove architecture specific sched_cpucount optimizationsAdhemerval Zanella2021-05-071-1/+0
| | | | | | | | | | | | | | And replace the generic algorithm with the Brian Kernighan's one. GCC optimize it with popcnt if the architecture supports, so there is no need to add the extra POPCNT define to enable it. This is really a micro-optimization that only adds complexity: recent ABIs already support it (x86-64-v2 or power64le) and it simplifies the code for internal usage, since i686 does not allow an internal iFUNC call. Checked on x86_64-linux-gnu, aarch64-linux-gnu, and powerpc64le-linux-gnu.
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-02103-103/+103
| | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
* x86: Install <sys/platform/x86.h> [BZ #26124]H.J. Lu2020-09-112-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Install <sys/platform/x86.h> so that programmers can do #if __has_include(<sys/platform/x86.h>) #include <sys/platform/x86.h> #endif ... if (CPU_FEATURE_USABLE (SSE2)) ... if (CPU_FEATURE_USABLE (AVX2)) ... <sys/platform/x86.h> exports only: enum { COMMON_CPUID_INDEX_1 = 0, COMMON_CPUID_INDEX_7, COMMON_CPUID_INDEX_80000001, COMMON_CPUID_INDEX_D_ECX_1, COMMON_CPUID_INDEX_80000007, COMMON_CPUID_INDEX_80000008, COMMON_CPUID_INDEX_7_ECX_1, /* Keep the following line at the end. */ COMMON_CPUID_INDEX_MAX }; struct cpuid_features { struct cpuid_registers cpuid; struct cpuid_registers usable; }; struct cpu_features { struct cpu_features_basic basic; struct cpuid_features features[COMMON_CPUID_INDEX_MAX]; }; /* Get a pointer to the CPU features structure. */ extern const struct cpu_features *__x86_get_cpu_features (unsigned int max) __attribute__ ((const)); Since all feature checks are done through macros, programs compiled with a newer <sys/platform/x86.h> are compatible with the older glibc binaries as long as the layout of struct cpu_features is identical. The features array can be expanded with backward binary compatibility for both .o and .so files. When COMMON_CPUID_INDEX_MAX is increased to support new processor features, __x86_get_cpu_features in the older glibc binaries returns NULL and HAS_CPU_FEATURE/CPU_FEATURE_USABLE return false on the new processor feature. No new symbol version is neeeded. Both CPU_FEATURE_USABLE and HAS_CPU_FEATURE are provided. HAS_CPU_FEATURE can be used to identify processor features. Note: Although GCC has __builtin_cpu_supports, it only supports a subset of <sys/platform/x86.h> and it is equivalent to CPU_FEATURE_USABLE. It doesn't support HAS_CPU_FEATURE.
* x86: Support usable check for all CPU featuresH.J. Lu2020-07-1311-88/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support usable check for all CPU features with the following changes: 1. Change struct cpu_features to struct cpuid_features { struct cpuid_registers cpuid; struct cpuid_registers usable; }; struct cpu_features { struct cpu_features_basic basic; struct cpuid_features features[COMMON_CPUID_INDEX_MAX]; unsigned int preferred[PREFERRED_FEATURE_INDEX_MAX]; ... }; so that there is a usable bit for each cpuid bit. 2. After the cpuid bits have been initialized, copy the known bits to the usable bits. EAX/EBX from INDEX_1 and EAX from INDEX_7 aren't used for CPU feature detection. 3. Clear the usable bits which require OS support. 4. If the feature is supported by OS, copy its cpuid bit to its usable bit. 5. Replace HAS_CPU_FEATURE and CPU_FEATURES_CPU_P with CPU_FEATURE_USABLE and CPU_FEATURE_USABLE_P to check if a feature is usable. 6. Add DEPR_FPU_CS_DS for INDEX_7_EBX_13. 7. Unset MPX feature since it has been deprecated. The results are 1. If the feature is known and doesn't requre OS support, its usable bit is copied from the cpuid bit. 2. Otherwise, its usable bit is copied from the cpuid bit only if the feature is known to supported by OS. 3. CPU_FEATURE_USABLE/CPU_FEATURE_USABLE_P are used to check if the feature can be used. 4. HAS_CPU_FEATURE/CPU_FEATURE_CPU_P are used to check if CPU supports the feature.
* i386: Remove NO_TLS_DIRECT_SEG_REFS handlingFlorian Weimer2020-05-282-40/+0
| | | | | This was needed for 32-bit PV Xen, which has been superseded by this point according to Xen developers.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-01103-103/+103
|
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-07103-103/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
* Fix handling of collating elements in fnmatch (bug 17396, bug 16976)Andreas Schwab2019-02-041-1/+2
| | | | | | This fixes the same bug in fnmatch that was fixed by commit 7e2f0d2d77 for regexp matching. As a side effect it also removes the use of an unbound VLA.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-01103-103/+103
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* x86: Don't include <init-arch.h> in assembly codesH.J. Lu2018-08-031-1/+0
| | | | | | | | | | | | There is no need to include <init-arch.h> in assembly codes since all x86 IFUNC selector functions are written in C. Tested on i686 and x86-64. There is no code change in libc.so, ld.so and libmvec.so. * sysdeps/i386/i686/multiarch/bzero-ia32.S: Don't include <init-arch.h>. * sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S: Likewise. * sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S: Likewise.
* i386: Use _CET_NOTRACK in memset-sse2-rep.SH.J. Lu2018-07-181-2/+2
| | | | | | * sysdeps/i386/i686/multiarch/memset-sse2-rep.S (BRANCH_TO_JMPTBL_ENTRY): Add _CET_NOTRACK before indirect jump to jump table.
* i386: Use _CET_NOTRACK in strcat-sse2.SH.J. Lu2018-07-181-2/+2
| | | | | | * sysdeps/i386/i686/multiarch/strcat-sse2.S (BRANCH_TO_JMPTBL_ENTRY): Add _CET_NOTRACK before indirect jump to jump table.
* i386: Use _CET_NOTRACK in strcpy-sse2.SH.J. Lu2018-07-181-2/+2
| | | | | | * sysdeps/i386/i686/multiarch/strcpy-sse2.S (BRANCH_TO_JMPTBL_ENTRY): Add _CET_NOTRACK before indirect jump to jump table.
* i386: Use _CET_NOTRACK in memcpy-ssse3.SH.J. Lu2018-07-181-2/+2
| | | | | | * sysdeps/i386/i686/multiarch/memcpy-ssse3.S (BRANCH_TO_JMPTBL_ENTRY): Add _CET_NOTRACK before indirect jump to jump table.
* i386: Use _CET_NOTRACK in memcpy-ssse3-rep.SH.J. Lu2018-07-181-4/+4
| | | | | | | * sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S (BRANCH_TO_JMPTBL_ENTRY): Add _CET_NOTRACK before indirect jump to jump table. (BRANCH_TO_JMPTBL_ENTRY_TAIL): Likewise.
* i386: Use _CET_NOTRACK in memcmp-sse4.SH.J. Lu2018-07-181-2/+2
| | | | | | * sysdeps/i386/i686/multiarch/memcmp-sse4.S (BRANCH_TO_JMPTBL_ENTRY): Add _CET_NOTRACK before indirect jump to jump table.
* i386: Use _CET_NOTRACK in memset-sse2.SH.J. Lu2018-07-181-2/+2
| | | | | | * sysdeps/i386/i686/multiarch/memset-sse2.S (BRANCH_TO_JMPTBL_ENTRY): Add _CET_NOTRACK before indirect jump to jump table.
* x86: Make strncmp usable from rtldFlorian Weimer2018-06-121-1/+1
| | | | | | | | | Due to the way the conditions were written, the rtld build of strncmp ended up with no definition of the strncmp symbol at all: The implementations were renamed for use within an IFUNC resolver, but the IFUNC resolver itself was missing (because rtld does not use IFUNCs). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Fix i386 memmove issue (bug 22644).Andrew Senkevich2018-03-231-6/+6
| | | | | | | [BZ #22644] * sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S: Fixed branch conditions. * string/test-memmove.c (do_test2): New testcase.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-01103-103/+103
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Use libm_alias_float for i386.Joseph Myers2017-11-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the preparation for additional _FloatN / _FloatNx function aliases, this patch makes i386 libm function implementations use libm_alias_float (or libm_alias_float_other in cases where the main symbol name is defined with versioned_symbol) to define function aliases. Tested with build-many-glibcs.py for all its i386 configurations that installed stripped shared libraries are unchanged by the patch, as well as running the full glibc testsuite for i686. * sysdeps/i386/fpu/s_asinhf.S: Include <libm-alias-float.h>. (asinhf): Define using libm_alias_float. * sysdeps/i386/fpu/s_atanf.S: Include <libm-alias-float.h>. (atanf): Define using libm_alias_float. * sysdeps/i386/fpu/s_cbrtf.S: Include <libm-alias-float.h>. (cbrtf): Define using libm_alias_float. * sysdeps/i386/fpu/s_ceilf.S: Include <libm-alias-float.h>. (ceilf): Define using libm_alias_float. * sysdeps/i386/fpu/s_copysignf.S: Include <libm-alias-float.h>. (copysignf): Define using libm_alias_float. * sysdeps/i386/fpu/s_expm1f.S: Include <libm-alias-float.h>. (expm1f): Define using libm_alias_float. * sysdeps/i386/fpu/s_fabsf.S: Include <libm-alias-float.h>. (fabsf): Define using libm_alias_float. * sysdeps/i386/fpu/s_floorf.S: Include <libm-alias-float.h>. (floorf): Define using libm_alias_float. * sysdeps/i386/fpu/s_fmaxf.S: Include <libm-alias-float.h>. (fmaxf): Define using libm_alias_float. * sysdeps/i386/fpu/s_fminf.S: Include <libm-alias-float.h>. (fminf): Define using libm_alias_float. * sysdeps/i386/fpu/s_frexpf.S: Include <libm-alias-float.h>. (frexpf): Define using libm_alias_float. * sysdeps/i386/fpu/s_llrintf.S: Include <libm-alias-float.h>. (llrintf): Define using libm_alias_float. * sysdeps/i386/fpu/s_logbf.S: Include <libm-alias-float.h>. (logbf): Define using libm_alias_float. * sysdeps/i386/fpu/s_lrintf.S: Include <libm-alias-float.h>. (lrintf): Define using libm_alias_float. * sysdeps/i386/fpu/s_nearbyintf.S: Include <libm-alias-float.h>. (nearbyintf): Define using libm_alias_float. * sysdeps/i386/fpu/s_remquof.S: Include <libm-alias-float.h>. (remquof): Define using libm_alias_float. * sysdeps/i386/fpu/s_rintf.S: Include <libm-alias-float.h>. (rintf): Define using libm_alias_float. * sysdeps/i386/fpu/s_truncf.S: Include <libm-alias-float.h>. (truncf): Define using libm_alias_float. * sysdeps/i386/i686/fpu/multiarch/e_exp2f.c: Include <libm-alias-float.h>. (exp2f): Define using libm_alias_float, or libm_alias_float_other if [SHARED]. * sysdeps/i386/i686/fpu/multiarch/e_expf.c: Include <libm-alias-float.h>. (expf): Define using libm_alias_float, or libm_alias_float_other if [SHARED]. * sysdeps/i386/i686/fpu/multiarch/e_log2f.c: Include <libm-alias-float.h>. (log2f): Define using libm_alias_float, or libm_alias_float_other if [SHARED]. * sysdeps/i386/i686/fpu/multiarch/e_logf.c: Include <libm-alias-float.h>. (logf): Define using libm_alias_float, or libm_alias_float_other if [SHARED]. * sysdeps/i386/i686/fpu/multiarch/e_powf.c: Include <libm-alias-float.h>. (powf): Define using libm_alias_float, or libm_alias_float_other if [SHARED]. * sysdeps/i386/i686/fpu/multiarch/s_cosf.c: Include <libm-alias-float.h>. (cosf): Define using libm_alias_float. * sysdeps/i386/i686/fpu/multiarch/s_sincosf.c: Include <libm-alias-float.h>. (sincosf): Define using libm_alias_float. * sysdeps/i386/i686/fpu/multiarch/s_sinf.c: Include <libm-alias-float.h>. (sinf): Define using libm_alias_float. * sysdeps/i386/i686/fpu/s_fmaxf.S: Include <libm-alias-float.h>. (fmaxf): Define using libm_alias_float. * sysdeps/i386/i686/fpu/s_fminf.S: Include <libm-alias-float.h>. (fminf): Define using libm_alias_float. * sysdeps/i386/i686/multiarch/s_fmaf.c: Include <libm-alias-float.h>. (fmaf): Define using libm_alias_float.
* Use libm_alias_double for i386.Joseph Myers2017-11-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the preparation for additional _FloatN / _FloatNx function aliases, this patch makes i386 libm function implementations use libm_alias_double to define function aliases. Tested with build-many-glibcs.py for all its i386 configurations that installed stripped shared libraries are unchanged by the patch, as well as running the full glibc testsuite for i686. * sysdeps/i386/fpu/s_asinh.S: Include <libm-alias-double.h>. (asinh): Define using libm_alias_double. * sysdeps/i386/fpu/s_atan.S: Include <libm-alias-double.h>. (atan): Define using libm_alias_double. * sysdeps/i386/fpu/s_cbrt.S: Include <libm-alias-double.h>. (cbrt): Define using libm_alias_double. * sysdeps/i386/fpu/s_ceil.S: Include <libm-alias-double.h>. (ceil): Define using libm_alias_double. * sysdeps/i386/fpu/s_copysign.S: Include <libm-alias-double.h>. (copysign): Define using libm_alias_double. * sysdeps/i386/fpu/s_expm1.S: Include <libm-alias-double.h>. (expm1): Define using libm_alias_double. * sysdeps/i386/fpu/s_fabs.S: Include <libm-alias-double.h>. (fabs): Define using libm_alias_double. * sysdeps/i386/fpu/s_fdim.c: Include <libm-alias-double.h>. (fdim): Define using libm_alias_double. * sysdeps/i386/fpu/s_floor.S: Include <libm-alias-double.h>. (floor): Define using libm_alias_double. * sysdeps/i386/fpu/s_fmax.S: Include <libm-alias-double.h>. (fmax): Define using libm_alias_double. * sysdeps/i386/fpu/s_fmin.S: Include <libm-alias-double.h>. (fmin): Define using libm_alias_double. * sysdeps/i386/fpu/s_frexp.S: Include <libm-alias-double.h>. (frexp): Define using libm_alias_double. * sysdeps/i386/fpu/s_llrint.S: Include <libm-alias-double.h>. (llrint): Define using libm_alias_double. * sysdeps/i386/fpu/s_logb.S: Include <libm-alias-double.h>. (logb): Define using libm_alias_double. * sysdeps/i386/fpu/s_lrint.S: Include <libm-alias-double.h>. (lrint): Define using libm_alias_double. * sysdeps/i386/fpu/s_nearbyint.S: Include <libm-alias-double.h>. (nearbyint): Define using libm_alias_double. * sysdeps/i386/fpu/s_remquo.S: Include <libm-alias-double.h>. (remquo): Define using libm_alias_double. * sysdeps/i386/fpu/s_rint.S: Include <libm-alias-double.h>. (rint): Define using libm_alias_double. * sysdeps/i386/fpu/s_trunc.S: Include <libm-alias-double.h>. (trunc): Define using libm_alias_double. * sysdeps/i386/i686/fpu/s_fmax.S: Include <libm-alias-double.h>. (fmax): Define using libm_alias_double. * sysdeps/i386/i686/fpu/s_fmin.S: Include <libm-alias-double.h>. (fmin): Define using libm_alias_double. * sysdeps/i386/i686/multiarch/s_fma.c: Include <libm-alias-double.h>. (fma): Define using libm_alias_double.
* Remove remaining _HAVE_STRING_ARCH_* definitions (BZ #18858)Adhemerval Zanella2017-09-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | Since the removal of bits/string.h, _HAVE_STRING_ARCH_* are no longer used. This patch removes the unused macros from i686 and x86_64 sysdeps folder. Checked on x86_64-linux-gnu and i686-linux-gnu. * sysdeps/i386/i686/multiarch/strncpy.c (_HAVE_STRING_ARCH_strncpy): Remove define. * sysdeps/x86_64/multiarch/stpcpy.c (_HAVE_STRING_ARCH_stpcpy): Likewise. * sysdeps/x86_64/multiarch/strcspn.c (_HAVE_STRING_ARCH_strcspn): Likewise. * sysdeps/x86_64/multiarch/strncat.c (_HAVE_STRING_ARCH_strncat): Likewise. * sysdeps/x86_64/multiarch/strncpy.c (_HAVE_STRING_ARCH_strncpy): Likewise. * sysdeps/x86_64/multiarch/strpbrk.c (_HAVE_STRING_ARCH_strpbrk): Likewise. * sysdeps/x86_64/multiarch/strspn.c (_HAVE_STRING_ARCH_strspn): Likewise.
* i686: Implement IFUNC selectors in CH.J. Lu2017-08-0499-1732/+2078
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add bcopy-ia32, bzero-ia32, rawmemchr-ia32 memchr-ia32, memcmp-ia32, memcpy-ia32, memmove-ia32, mempcpy-ia32, memset-ia32, strcat-ia32, strchr-ia32, strrchr-ia32, strcpy-ia32, strcmp-ia32, strcspn-ia32, strpbrk-ia32, strspn-ia32, strlen-ia32, stpcpy-ia32, stpncpy-ia32, memcpy_chk-nonshared, mempcpy_chk-nonshared, memmove_chk-nonshared and memset_chk-nonshared * sysdeps/i386/i686/multiarch/bcopy-ia32.S: New file. * sysdeps/i386/i686/multiarch/bcopy.c: Likewise. * sysdeps/i386/i686/multiarch/bzero-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/bzero.c: Likewise. * sysdeps/i386/i686/multiarch/ifunc-memmove.h: Likewise. * sysdeps/i386/i686/multiarch/ifunc-memset.h: Likewise. * sysdeps/i386/i686/multiarch/ifunc-sse2-bsf.h: Likewise. * sysdeps/i386/i686/multiarch/ifunc-sse2-ssse3.h: Likewise. * sysdeps/i386/i686/multiarch/ifunc-sse2.h: Likewise. * sysdeps/i386/i686/multiarch/ifunc-sse4_2.h: Likewise. * sysdeps/i386/i686/multiarch/ifunc-ssse3-sse4_2.h: Likewise. * sysdeps/i386/i686/multiarch/memchr-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/memchr.c: Likewise. * sysdeps/i386/i686/multiarch/memcmp-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/memcmp.c: Likewise. * sysdeps/i386/i686/multiarch/memcpy-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy.c: Likewise. * sysdeps/i386/i686/multiarch/memcpy_chk-nonshared.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy_chk.c: Likewise. * sysdeps/i386/i686/multiarch/memmove-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/memmove.c: Likewise. * sysdeps/i386/i686/multiarch/memmove_chk-nonshared.S: Likewise. * sysdeps/i386/i686/multiarch/memmove_chk.c: Likewise. * sysdeps/i386/i686/multiarch/mempcpy-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/mempcpy.c: Likewise. * sysdeps/i386/i686/multiarch/mempcpy_chk-nonshared.S: Likewise. * sysdeps/i386/i686/multiarch/mempcpy_chk.c: Likewise. * sysdeps/i386/i686/multiarch/memrchr.c: Likewise. * sysdeps/i386/i686/multiarch/memset-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/memset.c: Likewise. * sysdeps/i386/i686/multiarch/memset_chk-nonshared.S: Likewise. * sysdeps/i386/i686/multiarch/rawmemchr-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/rawmemchr.c: Likewise. * sysdeps/i386/i686/multiarch/stpcpy-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/stpcpy-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/stpcpy.c: Likewise. * sysdeps/i386/i686/multiarch/stpncpy-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/stpncpy.c: Likewise. * sysdeps/i386/i686/multiarch/strcasecmp.c: Likewise. * sysdeps/i386/i686/multiarch/strcasecmp_l.c: Likewise. * sysdeps/i386/i686/multiarch/strcat-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/strcat.c: Likewise. * sysdeps/i386/i686/multiarch/strchr-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/strchr.c: Likewise. * sysdeps/i386/i686/multiarch/strcmp-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/strcmp.c: Likewise. * sysdeps/i386/i686/multiarch/strcpy-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/strcpy.c: Likewise. * sysdeps/i386/i686/multiarch/strcspn-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/strcspn.c: Likewise. * sysdeps/i386/i686/multiarch/strlen-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/strlen.c: Likewise. * sysdeps/i386/i686/multiarch/strncase.c: Likewise. * sysdeps/i386/i686/multiarch/strncase_l.c: Likewise. * sysdeps/i386/i686/multiarch/strncat.c: Likewise. * sysdeps/i386/i686/multiarch/strncmp.c: Likewise. * sysdeps/i386/i686/multiarch/strncpy.c: Likewise. * sysdeps/i386/i686/multiarch/strnlen.c: Likewise. * sysdeps/i386/i686/multiarch/strpbrk-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/strpbrk.c: Likewise. * sysdeps/i386/i686/multiarch/strrchr-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/strrchr.c: Likewise. * sysdeps/i386/i686/multiarch/strspn-ia32.S: Likewise. * sysdeps/i386/i686/multiarch/strspn.c: Likewise. * sysdeps/i386/i686/multiarch/wcschr.c: Likewise. * sysdeps/i386/i686/multiarch/wcscmp.c: Likewise. * sysdeps/i386/i686/multiarch/wcscpy.c: Likewise. * sysdeps/i386/i686/multiarch/wcslen.c: Likewise. * sysdeps/i386/i686/multiarch/wcsrchr.c: Likewise. * sysdeps/i386/i686/multiarch/wmemcmp.c: Likewise. * sysdeps/i386/i686/multiarch/bcopy.S: Removed. * sysdeps/i386/i686/multiarch/bzero.S: Likewise. * sysdeps/i386/i686/multiarch/memchr.S: Likewise. * sysdeps/i386/i686/multiarch/memcmp.S: Likewise. * 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/memrchr.S: Likewise. * sysdeps/i386/i686/multiarch/memset.S: Likewise. * sysdeps/i386/i686/multiarch/memset_chk.S: Likewise. * sysdeps/i386/i686/multiarch/rawmemchr.S: Likewise. * sysdeps/i386/i686/multiarch/stpcpy.S: Likewise. * sysdeps/i386/i686/multiarch/stpncpy.S: Likewise. * sysdeps/i386/i686/multiarch/strcasecmp.S: Likewise. * sysdeps/i386/i686/multiarch/strcasecmp_l.S: Likewise. * sysdeps/i386/i686/multiarch/strcat.S: Likewise. * sysdeps/i386/i686/multiarch/strcmp.S: Likewise. * sysdeps/i386/i686/multiarch/strcpy.S: Likewise. * sysdeps/i386/i686/multiarch/strcspn.S: Likewise. * sysdeps/i386/i686/multiarch/strlen.S: Likewise. * sysdeps/i386/i686/multiarch/strncase.S: Likewise. * sysdeps/i386/i686/multiarch/strncase_l.S: Likewise. * sysdeps/i386/i686/multiarch/strncat.S: Likewise. * sysdeps/i386/i686/multiarch/strncmp.S: Likewise. * sysdeps/i386/i686/multiarch/strncpy.S: Likewise. * sysdeps/i386/i686/multiarch/strnlen.S: Likewise. * sysdeps/i386/i686/multiarch/strpbrk.S: Likewise. * sysdeps/i386/i686/multiarch/strrchr.S: Likewise. * sysdeps/i386/i686/multiarch/strspn.S: Likewise. * sysdeps/i386/i686/multiarch/wcschr.S: Likewise. * sysdeps/i386/i686/multiarch/wcscmp.S: Likewise. * sysdeps/i386/i686/multiarch/wcscpy.S: Likewise. * sysdeps/i386/i686/multiarch/wcslen.S: Likewise. * sysdeps/i386/i686/multiarch/wcsrchr.S: Likewise. * sysdeps/i386/i686/multiarch/wmemcmp.S: Likewise.
* x86: Remove __memset_zero_constant_len_parameter [BZ #21790]H.J. Lu2017-08-041-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __memset_zero_constant_len_parameter should be removed by commit 61062f56304750c367c5c1533351621353c112a7 Author: Ulrich Drepper <drepper@redhat.com> Date: Tue Mar 1 00:35:23 2005 +0000 2005-02-24 Roland McGrath <roland@redhat.com> * debug/Versions (libc: GLIBC_2.4): Remove __memset_zero_constant_len_parameter. * sysdeps/generic/memset_chk.c: Remove alias and warning. * misc/sys/cdefs.h (__warndecl): New macro. * debug/warning-nop.c: New file. * string/bits/string3.h (memset): Call __warn_memset_zero_len with no arguments, instead of calling __memset_zero_constant_len_parameter. Use __warndecl for __warn_memset_zero_len. * debug/Makefile (routines): Add $(static-only-routines). (static-only-routines): New variable. This patch removes the last emaining pieces of it. Tested it on i586, i686 and x86-64. [BZ #21790] * sysdeps/i386/i586/memset.S (__memset_zero_constant_len_parameter): Removed. * sysdeps/i386/i686/memset.S (__memset_zero_constant_len_parameter): Likewise. * sysdeps/i386/i686/multiarch/memset_chk.S (__memset_zero_constant_len_parameter): Likewise. * sysdeps/x86_64/memset.S (__memset_zero_constant_len_parameter): Likewise.
* i386: Check PIC to enable PIC setups in multiarch functionsH.J. Lu2017-08-028-34/+34
| | | | | | | | | | | | | | Check PIC, instead of SHARED, to enable PIC setups. * sysdeps/i386/i686/multiarch/memcmp-sse4.S: Check PIC instead of SHARED. * sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/memset-sse2-rep.S: Likewise. * sysdeps/i386/i686/multiarch/memset-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strcat-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strcpy-sse2.S: Likewise.
* i386: Don't define multiarch __memmove_chk in libc.a [BZ #21791]H.J. Lu2017-08-023-3/+3
| | | | | | | | | | | | | There is no need to define multiarch __memmove_chk in libc.a since they aren't used at all. [BZ #21791] * sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S (MEMCPY_CHK): Define only if SHARED is defined. * sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S (MEMCPY_CHK): Likewise. * sysdeps/i386/i686/multiarch/memcpy-ssse3.S (MEMCPY_CHK): Likewise.
* i386: Test memmove_chk and memset_chk only in libc.so [BZ #21741]H.J. Lu2017-07-191-0/+4
| | | | | | | | | | Since there are no multiarch versions of memmove_chk and memset_chk, test multiarch versions of memmove_chk and memset_chk only in libc.so. [BZ #21741] * sysdeps/i386/i686/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Test memmove_chk and memset_chk only in libc.so.
* Remove bits/string.h.Zack Weinberg2017-06-201-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These machine-dependent inline string functions have never been on by default, and even if they were a good idea at the time they were introduced, they haven't really been touched in ten to fifteen years and probably aren't a good idea on current-gen processors. Current thinking is that this class of optimization is best left to the compiler. * bits/string.h, string/bits/string.h * sysdeps/aarch64/bits/string.h * sysdeps/m68k/m680x0/m68020/bits/string.h * sysdeps/s390/bits/string.h, sysdeps/sparc/bits/string.h * sysdeps/x86/bits/string.h: Delete file. * string/string.h: Don't include bits/string.h. * string/bits/string3.h: Rename to bits/string_fortified.h. No need to undef various symbols that the removed headers might have defined as macros. * string/Makefile (headers): Remove bits/string.h, change bits/string3.h to bits/string_fortified.h. * string/string-inlines.c: Update commentary. Remove definitions of various macros that nothing looks at anymore. Don't directly include bits/string.h. Set _STRING_INLINE_unaligned here, based on compiler-predefined macros. * string/strncat.c: If STRNCAT is not defined, or STRNCAT_PRIMARY _is_ defined, provide internal hidden alias __strncat. * include/string.h: Declare internal hidden alias __strncat. Only forward __stpcpy to __builtin_stpcpy if __NO_STRING_INLINES is not defined. * include/bits/string3.h: Rename to bits/string_fortified.h, update to match above. * sysdeps/i386/string-inlines.c: Define compat symbols for everything formerly defined by sysdeps/x86/bits/string.h. Make existing definitions into compat symbols as well. Remove some no-longer-necessary messing around with macros. * sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c * sysdeps/powerpc/powerpc64/multiarch/mempcpy.c * sysdeps/powerpc/powerpc64/multiarch/stpcpy.c * sysdeps/s390/multiarch/mempcpy.c No need to define _HAVE_STRING_ARCH_mempcpy. Do define __NO_STRING_INLINES and NO_MEMPCPY_STPCPY_REDIRECT. * sysdeps/i386/i686/multiarch/strncat-c.c * sysdeps/s390/multiarch/strncat-c.c * sysdeps/x86_64/multiarch/strncat-c.c Define STRNCAT_PRIMARY. Don't change definition of libc_hidden_def.
* i686: Add missing IS_IN (libc) guards to vectorized strcspnFlorian Weimer2017-06-142-3/+7
| | | | | | | | | Since commit d957c4d3fa48d685ff2726c605c988127ef99395 (i386: Compile rtld-*.os with -mno-sse -mno-mmx -mfpmath=387), vector intrinsics can no longer be used in ld.so, even if the compiled code never makes it into the final ld.so link. This commit adds the missing IS_IN (libc) guard to the SSE 4.2 strcspn implementation, so that it can be used from ld.so in the future.
* x86: Optimize SSE2 memchr overflow calculationH.J. Lu2017-05-191-8/+6
| | | | | | | | | | | | | | | | | | | | | | | SSE2 memchr computes "edx + ecx - 16" where ecx is less than 16. Use "edx - (16 - ecx)", instead of satured math, to avoid possible addition overflow. This replaces add %ecx, %edx sbb %eax, %eax or %eax, %edx sub $16, %edx with neg %ecx add $16, %ecx sub %ecx, %edx It is the same for x86_64, except for rcx/rdx, instead of ecx/edx. * sysdeps/i386/i686/multiarch/memchr-sse2.S (MEMCHR): Use "edx + ecx - 16" to avoid possible addition overflow. * sysdeps/x86_64/memchr.S (memchr): Likewise.
* Fix i686 memchr overflow calculation (BZ#21182)Adhemerval Zanella2017-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes the regression added by 23d2770 for final address overflow calculation. The subtraction of the considered size (16) at line 120 is at wrong place, for sizes less than 16 subsequent overflow check will not take in consideration an invalid size (since the subtraction will be negative). Also, the lea instruction also does not raise the carry flag (CF) that is used in subsequent jbe to check for overflow. The fix is to follow x86_64 logic from 3daef2c where the overflow is first check and a sub instruction is issued. In case of resulting negative size, CF will be set by the sub instruction and a NULL result will be returned. The patch also add similar tests reported in bug report. Checked on i686-linux-gnu and x86_64-linux-gnu. * string/test-memchr.c (do_test): Add BZ#21182 checks for address near end of a page. * sysdeps/i386/i686/multiarch/memchr-sse2.S (__memchr): Fix overflow calculation.
* Fix x86 strncat optimized implementation for large sizesAdhemerval Zanella2017-01-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | Similar to BZ#19387, BZ#21014, and BZ#20971, both x86 sse2 strncat optimized assembly implementations do not handle the size overflow correctly. The x86_64 one is in fact an issue with strcpy-sse2-unaligned, but that is triggered also with strncat optimized implementation. This patch uses a similar strategy used on 3daef2c8ee4df2, where saturared math is used for overflow case. Checked on x86_64-linux-gnu and i686-linux-gnu. It fixes BZ #19390. [BZ #19390] * string/test-strncat.c (test_main): Add tests with SIZE_MAX as maximum string size. * sysdeps/i386/i686/multiarch/strcat-sse2.S (STRCAT): Avoid overflow in pointer addition. * sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S (STRCPY): Likewise.
* Fix i686 memchr for large input sizesAdhemerval Zanella2017-01-022-3/+15
| | | | | | | | | | | | | | | | | | | Similar to BZ#19387 and BZ#20971, both i686 memchr optimized assembly implementations (memchr-sse2-bsf and memchr-sse2) do not handle the size overflow correctly. It is shown by the new tests added by commit 3daef2c8ee4df29, where both implementation fails with size as SIZE_MAX. This patch uses a similar strategy used on 3daef2c8ee4df2, where saturared math is used for overflow case. Checked on i686-linux-gnu. [BZ #21014] * sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S (MEMCHR): Avoid overflow in pointer addition. * sysdeps/i386/i686/multiarch/memchr-sse2.S (MEMCHR): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-0164-64/+64
|
* Remove x86 ifunc-defines.sym and rtld-global-offsets.symH.J. Lu2016-05-112-20/+0
| | | | | | | | | | | | | | | | | | | | Merge x86 ifunc-defines.sym with x86 cpu-features-offsets.sym. Remove x86 ifunc-defines.sym and rtld-global-offsets.sym. No code changes on i686 and x86-64. * sysdeps/i386/i686/multiarch/Makefile (gen-as-const-headers): Remove ifunc-defines.sym. * sysdeps/x86_64/multiarch/Makefile (gen-as-const-headers): Likewise. * sysdeps/i386/i686/multiarch/ifunc-defines.sym: Removed. * sysdeps/x86/rtld-global-offsets.sym: Likewise. * sysdeps/x86_64/multiarch/ifunc-defines.sym: Likewise. * sysdeps/x86/Makefile (gen-as-const-headers): Remove rtld-global-offsets.sym. * sysdeps/x86_64/multiarch/ifunc-defines.sym: Merged with ... * sysdeps/x86/cpu-features-offsets.sym: This. * sysdeps/x86/cpu-features.h: Include <cpu-features-offsets.h> instead of <ifunc-defines.h> and <rtld-global-offsets.h>.
* Use HAS_ARCH_FEATURE with Fast_Rep_StringH.J. Lu2016-03-069-9/+9
| | | | | | | | | | | | | | | | | | | | | HAS_ARCH_FEATURE, not HAS_CPU_FEATURE, should be used with Fast_Rep_String. [BZ #19762] * sysdeps/i386/i686/multiarch/bcopy.S (bcopy): Use HAS_ARCH_FEATURE with Fast_Rep_String. * sysdeps/i386/i686/multiarch/bzero.S (__bzero): Likewise. * sysdeps/i386/i686/multiarch/memcpy.S (memcpy): Likewise. * sysdeps/i386/i686/multiarch/memcpy_chk.S (__memcpy_chk): Likewise. * sysdeps/i386/i686/multiarch/memmove_chk.S (__memmove_chk): Likewise. * sysdeps/i386/i686/multiarch/mempcpy.S (__mempcpy): Likewise. * sysdeps/i386/i686/multiarch/mempcpy_chk.S (__mempcpy_chk): Likewise. * sysdeps/i386/i686/multiarch/memset.S (memset): Likewise. * sysdeps/i386/i686/multiarch/memset_chk.S (__memset_chk): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-0464-64/+64
|
* Remove configure tests for AVX support.Joseph Myers2015-10-085-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC added support for -mavx and -msse2avx in version 4.4. Thus the configure tests for this support are obsolete, and this patch removes them. Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by this patch). * sysdeps/i386/configure.ac (libc_cv_cc_avx): Remove configure test. (libc_cv_cc_sse2avx): Likewise. * sysdeps/i386/configure: Regenerated. * sysdeps/i386/i686/multiarch/Makefile [$(subdir)$(config-cflags-avx) = mathyes]: Change conditional to [$(subdir) = math]. * sysdeps/i386/i686/multiarch/s_fma-fma.c [HAVE_AVX_SUPPORT]: Make code unconditional. * sysdeps/i386/i686/multiarch/s_fma.c [HAVE_AVX_SUPPORT]: Likewise. * sysdeps/i386/i686/multiarch/s_fmaf-fma.c [HAVE_AVX_SUPPORT]: Likewise. * sysdeps/i386/i686/multiarch/s_fmaf.c [HAVE_AVX_SUPPORT]: Likewise. * sysdeps/x86_64/configure.ac (libc_cv_cc_avx): Remove configure test. (libc_cv_cc_sse2avx): Likewise. * sysdeps/x86_64/configure: Regenerated. * sysdeps/x86_64/Makefile [$(config-cflags-avx) = yes]: Make code unconditional. * sysdeps/x86_64/dl-trampoline.h (_dl_runtime_profile) [HAVE_AVX_SUPPORT || HAVE_AVX512_ASM_SUPPORT]: Make code unconditional. (_dl_runtime_profile) [!(HAVE_AVX_SUPPORT || HAVE_AVX512_ASM_SUPPORT)]: Remove conditional code. * sysdeps/x86_64/fpu/multiarch/Makefile [$(config-cflags-sse2avx) = yes]: Make code unconditional. * sysdeps/x86_64/fpu/multiarch/e_atan2.c [HAVE_FMA4_SUPPORT || HAVE_AVX_SUPPORT]: Likewise. * sysdeps/x86_64/fpu/multiarch/e_exp.c [HAVE_FMA4_SUPPORT || HAVE_AVX_SUPPORT]: Likewise. * sysdeps/x86_64/fpu/multiarch/e_log.c [HAVE_FMA4_SUPPORT || HAVE_AVX_SUPPORT]: Likewise. * sysdeps/x86_64/fpu/multiarch/s_atan.c [HAVE_FMA4_SUPPORT || HAVE_AVX_SUPPORT]: Likewise. * sysdeps/x86_64/fpu/multiarch/s_fma.c [HAVE_AVX_SUPPORT]: Likewise. * sysdeps/x86_64/fpu/multiarch/s_fmaf.c [HAVE_AVX_SUPPORT]: Likewise. * sysdeps/x86_64/fpu/multiarch/s_sin.c [HAVE_FMA4_SUPPORT || HAVE_AVX_SUPPORT]: Likewise. * sysdeps/x86_64/fpu/multiarch/s_tan.c [HAVE_FMA4_SUPPORT || HAVE_AVX_SUPPORT]: Likewise. * sysdeps/x86_64/multiarch/strcmp.S [HAVE_AVX_SUPPORT]: Likewise. * config.h.in (HAVE_AVX_SUPPORT): Remove #undef. (HAVE_SSE2AVX_SUPPORT): Likewise.
* Remove configure tests for SSE4 support.Joseph Myers2015-10-063-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | GCC added support for -msse4 in version 4.3. Thus the configure tests for it are obsolete, and this patch removes them. Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by this patch). * sysdeps/i386/configure.ac (libc_cv_cc_sse4): Remove configure test. * sysdeps/i386/configure: Regenerated. * sysdeps/i386/i686/multiarch/Makefile [$(config-cflags-sse4) = yes]: Make code unconditional. * sysdeps/i386/i686/multiarch/strcspn.S [HAVE_SSE4_SUPPORT]: Likewise. * sysdeps/i386/i686/multiarch/strspn.S [HAVE_SSE4_SUPPORT]: Likewise. * sysdeps/x86_64/configure.ac (libc_cv_cc_sse4): Remove configure test. * sysdeps/x86_64/configure: Regenerated. * sysdeps/x86_64/multiarch/Makefile [$(config-cflags-sse4) = yes]: Make code unconditional. * sysdeps/x86_64/multiarch/strcspn.S [HAVE_SSE4_SUPPORT]: Likewise. * sysdeps/x86_64/multiarch/strspn.S [HAVE_SSE4_SUPPORT]: Likewise. * config.h.in (HAVE_SSE4_SUPPORT): Remove #undef.
* Move i486/strcat.S to strcat.SH.J. Lu2015-08-271-1/+1
| | | | | | | | | Since glibc doesn't support i386 any more, we can move i486/strcat.S to strcat.S. * sysdeps/i386/i486/strcat.S: Moved to ... * sysdeps/i386/strcat.S: Here. * sysdeps/i386/i686/multiarch/strcat.S: Updated.
* Remove the unused IFUNC filesH.J. Lu2015-08-201-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sysdeps/i386/i686/multiarch/strcasestr-c.c became unused after commit 1818483b15d22016b0eae41d37ee91cc87b37510 Author: Andreas Schwab <schwab@suse.de> Date: Wed Dec 18 11:53:27 2013 +1000 Remove use of SSE4.2 functions for strstr on i686 which contains -sysdep_routines += strcspn-c strpbrk-c strspn-c strstr-c strcasestr-c +sysdep_routines += strcspn-c strpbrk-c strspn-c sysdeps/x86_64/multiarch/strcasestr.c became useless after t 584b18eb4df61ccd447db2dfe8c8a7901f8c8598 Author: Ondřej Bílka <neleai@seznam.cz> Date: Sat Dec 14 19:33:56 2013 +0100 Add strstr with unaligned loads. Fixes bug 12100. which changes sysdeps/x86_64/multiarch/strcasestr.c to libc_ifunc (__strcasestr, __strcasestr_sse2); This patch removes these file. * i386/i686/multiarch/strcasestr-c.c: Removed. * x86_64/multiarch/strcasestr.c: Likewise. * x86_64/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Remove strcasestr.
* Move x86_64 init-arch.h to sysdeps/x86/init-arch.hH.J. Lu2015-08-201-1/+0
| | | | | | | | | | | | Move sysdeps/x86_64/multiarch/init-arch.h to sysdeps/x86/init-arch.h which can be used for both i386 and x86_64. * sysdeps/i386/i686/multiarch/init-arch.h: Removed. * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise. * sysdeps/x86_64/cacheinfo.c: Include <init-arch.h> instead of "multiarch/init-arch.h". * sysdeps/x86_64/multiarch/init-arch.h: Renamed to ... * sysdeps/x86/init-arch.h: This.
* Remove x86 init-arch.cH.J. Lu2015-08-201-1/+0
| | | | | | | | Both files include sysdeps/x86_64/multiarch/init-arch.c which has been removed. * sysdeps/i386/i686/multiarch/init-arch.c: Removed. * sysdeps/unix/sysv/linux/x86/init-arch.c: Likewise.
* Update i686 multiarch functions for <cpu-features.h>H.J. Lu2015-08-1334-882/+346
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates i686 multiarch functions to use the newly defined HAS_CPU_FEATURE, HAS_ARCH_FEATURE, LOAD_GOT_AND_RTLD_GLOBAL_RO and LOAD_FUNC_GOT_EAX from <cpu-features.h>. * sysdeps/i386/i686/fpu/multiarch/e_expf.c: Replace HAS_XXX with HAS_CPU_FEATURE/HAS_ARCH_FEATURE (XXX). * sysdeps/i386/i686/fpu/multiarch/s_cosf.c: Likewise. * sysdeps/i386/i686/fpu/multiarch/s_cosf.c: Likewise. * sysdeps/i386/i686/fpu/multiarch/s_sincosf.c: Likewise. * sysdeps/i386/i686/fpu/multiarch/s_sinf.c: Likewise. * sysdeps/i386/i686/multiarch/ifunc-impl-list.c: Likewise. * sysdeps/i386/i686/multiarch/s_fma.c: Likewise. * sysdeps/i386/i686/multiarch/s_fmaf.c: Likewise. * sysdeps/i386/i686/multiarch/bcopy.S: Remove __init_cpu_features call. Merge SHARED and !SHARED. Add LOAD_GOT_AND_RTLD_GLOBAL_RO. Use LOAD_FUNC_GOT_EAX to load function address. Replace HAS_XXX with HAS_CPU_FEATURE/HAS_ARCH_FEATURE (XXX). * sysdeps/i386/i686/multiarch/bzero.S: Likewise. * sysdeps/i386/i686/multiarch/memchr.S: Likewise. * sysdeps/i386/i686/multiarch/memcmp.S: Likewise. * 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/memrchr.S: Likewise. * sysdeps/i386/i686/multiarch/memset.S: Likewise. * sysdeps/i386/i686/multiarch/memset_chk.S: Likewise. * sysdeps/i386/i686/multiarch/rawmemchr.S: Likewise. * sysdeps/i386/i686/multiarch/strcasecmp.S: Likewise. * sysdeps/i386/i686/multiarch/strcat.S: Likewise. * sysdeps/i386/i686/multiarch/strchr.S: Likewise. * sysdeps/i386/i686/multiarch/strcmp.S: Likewise. * sysdeps/i386/i686/multiarch/strcpy.S: Likewise. * sysdeps/i386/i686/multiarch/strcspn.S: Likewise. * sysdeps/i386/i686/multiarch/strlen.S: Likewise. * sysdeps/i386/i686/multiarch/strncase.S: Likewise. * sysdeps/i386/i686/multiarch/strnlen.S: Likewise. * sysdeps/i386/i686/multiarch/strrchr.S: Likewise. * sysdeps/i386/i686/multiarch/strspn.S: Likewise. * sysdeps/i386/i686/multiarch/wcschr.S: Likewise. * sysdeps/i386/i686/multiarch/wcscmp.S: Likewise. * sysdeps/i386/i686/multiarch/wcscpy.S: Likewise. * sysdeps/i386/i686/multiarch/wcslen.S: Likewise. * sysdeps/i386/i686/multiarch/wcsrchr.S: Likewise. * sysdeps/i386/i686/multiarch/wmemcmp.S: Likewise.
* Add _dl_x86_cpu_features to rtld_globalH.J. Lu2015-08-133-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds _dl_x86_cpu_features to rtld_global in x86 ld.so and initializes it early before __libc_start_main is called so that cpu_features is always available when it is used and we can avoid calling __init_cpu_features in IFUNC selectors. * sysdeps/i386/dl-machine.h: Include <cpu-features.c>. (dl_platform_init): Call init_cpu_features. * sysdeps/i386/dl-procinfo.c (_dl_x86_cpu_features): New. * sysdeps/i386/i686/cacheinfo.c (DISABLE_PREFERRED_MEMORY_INSTRUCTION): Removed. * sysdeps/i386/i686/multiarch/Makefile (aux): Remove init-arch. * sysdeps/i386/i686/multiarch/Versions: Removed. * sysdeps/i386/i686/multiarch/ifunc-defines.sym (KIND_OFFSET): Removed. * sysdeps/i386/ldsodefs.h: Include <cpu-features.h>. * sysdeps/unix/sysv/linux/x86/Makefile (libpthread-sysdep_routines): Remove init-arch. * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c: Include <sysdeps/x86_64/dl-procinfo.c> instead of sysdeps/generic/dl-procinfo.c>. * sysdeps/x86/Makefile [$(subdir) == csu] (gen-as-const-headers): Add cpu-features-offsets.sym and rtld-global-offsets.sym. [$(subdir) == elf] (sysdep-dl-routines): Add dl-get-cpu-features. [$(subdir) == elf] (tests): Add tst-get-cpu-features. [$(subdir) == elf] (tests-static): Add tst-get-cpu-features-static. * sysdeps/x86/Versions: New file. * sysdeps/x86/cpu-features-offsets.sym: Likewise. * sysdeps/x86/cpu-features.c: Likewise. * sysdeps/x86/cpu-features.h: Likewise. * sysdeps/x86/dl-get-cpu-features.c: Likewise. * sysdeps/x86/libc-start.c: Likewise. * sysdeps/x86/rtld-global-offsets.sym: Likewise. * sysdeps/x86/tst-get-cpu-features-static.c: Likewise. * sysdeps/x86/tst-get-cpu-features.c: Likewise. * sysdeps/x86_64/dl-procinfo.c: Likewise. * sysdeps/x86_64/cacheinfo.c (__cpuid_count): Removed. Assume USE_MULTIARCH is defined and don't check it. (is_intel): Replace __cpu_features with GLRO(dl_x86_cpu_features). (is_amd): Likewise. (max_cpuid): Likewise. (intel_check_word): Likewise. (__cache_sysconf): Don't call __init_cpu_features. (__x86_preferred_memory_instruction): Removed. (init_cacheinfo): Don't call __init_cpu_features. Replace __cpu_features with GLRO(dl_x86_cpu_features). * sysdeps/x86_64/dl-machine.h: <cpu-features.c>. (dl_platform_init): Call init_cpu_features. * sysdeps/x86_64/ldsodefs.h: Include <cpu-features.h>. * sysdeps/x86_64/multiarch/Makefile (aux): Remove init-arch. * sysdeps/x86_64/multiarch/Versions: Removed. * sysdeps/x86_64/multiarch/cacheinfo.c: Likewise. * sysdeps/x86_64/multiarch/init-arch.c: Likewise. * sysdeps/x86_64/multiarch/ifunc-defines.sym (KIND_OFFSET): Removed. * sysdeps/x86_64/multiarch/init-arch.h: Rewrite.
* Fix regcomp wcscoll, wcscmp namespace (bug 18497).Joseph Myers2015-06-092-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | regcomp brings in references to wcscoll, which isn't in all the standards that contain regcomp. In turn, wcscoll brings in references to wcscmp, also not in all those standards. This patch fixes this by making those functions into weak aliases of __wcscoll and __wcscmp and calling those names instead as needed. Tested for x86_64 and x86 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #18497] * wcsmbs/wcscmp.c [!WCSCMP] (WCSCMP): Define as __wcscmp instead of wcscmp. (wcscmp): Define as weak alias of WCSCMP. * wcsmbs/wcscoll.c (STRCOLL): Define as __wcscoll instead of wcscoll. (USE_HIDDEN_DEF): Define. [!USE_IN_EXTENDED_LOCALE_MODEL] (wcscoll): Define as weak alias of __wcscoll. Don't use libc_hidden_weak. * wcsmbs/wcscoll_l.c (STRCMP): Define as __wcscmp instead of wcscmp. * sysdeps/i386/i686/multiarch/wcscmp-c.c [SHARED] (libc_hidden_def): Define __GI___wcscmp instead of __GI_wcscmp. (weak_alias): Undefine and redefine. * sysdeps/i386/i686/multiarch/wcscmp.S (wcscmp): Rename to __wcscmp and define as weak alias of __wcscmp. * sysdeps/x86_64/wcscmp.S (wcscmp): Likewise. * include/wchar.h (__wcscmp): Declare. Use libc_hidden_proto. (__wcscoll): Likewise. (wcscmp): Don't use libc_hidden_proto. (wcscoll): Likewise. * posix/regcomp.c (build_range_exp): Call __wcscoll instead of wcscoll. * posix/regexec.c (check_node_accept_bytes): Likewise. * conform/Makefile (test-xfail-XPG3/regex.h/linknamespace): Remove variable. (test-xfail-XPG4/regex.h/linknamespace): Likewise. (test-xfail-POSIX/regex.h/linknamespace): Likewise.
* Use libc_hidden_proto / libc_hidden_def with __strnlen.Joseph Myers2015-06-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various code in glibc uses __strnlen instead of strnlen for namespace reasons. However, __strnlen does not use libc_hidden_proto / libc_hidden_def (as is normally done for any function defined and called within the same library, whether or not exported from the library and whatever namespace it is in), so the compiler does not know that those calls are to a function within libc. This patch uses libc_hidden_proto / libc_hidden_def with __strnlen. On x86_64, it makes no difference to the installed stripped shared libraries. On 32-bit x86, it causes __strnlen calls to go to the same place as strnlen calls (the fallback strnlen implementation), rather than through a PLT entry for the strnlen IFUNC; I'm not sure of the logic behind when calls from within libc should use IFUNCs versus when they should go direct to a particular function implementation, but clearly it doesn't make sense for strnlen and __strnlen to be handled differently in this regard. Tested for x86_64 and x86 (testsuite, and comparison of installed shared libraries as described above). * string/strnlen.c [!STRNLEN] (__strnlen): Use libc_hidden_def. * include/string.h (__strnlen): Use libc_hidden_proto. * sysdeps/aarch64/strnlen.S (__strnlen): Use libc_hidden_def. * sysdeps/i386/i686/multiarch/strnlen-c.c [SHARED] (libc_hidden_def): Define __GI___strnlen as well as __GI_strnlen. * sysdeps/powerpc/powerpc32/power4/multiarch/strnlen-power7.S (libc_hidden_def): Undefine and redefine. * sysdeps/powerpc/powerpc32/power4/multiarch/strnlen-ppc32.c [SHARED] (libc_hidden_def): Define __GI___strnlen as well as __GI_strnlen. * sysdeps/powerpc/powerpc32/power7/strnlen.S (__strnlen): Use libc_hidden_def. * sysdeps/tile/tilegx/strnlen.c (__strnlen): Likewise.
* powerpc: Fix __wcschr static buildAdhemerval Zanella2015-04-151-2/+8
| | | | | | | | | | | This patch fix the static build for strftime, which uses __wcschr. Current powerpc32 implementation defines the __wcschr be an alias to __wcschr_ppc32 and current implementation misses the correct alias for static build. It also changes the default wcschr.c logic so a IFUNC implementation should just define WCSCHR and undefine the required alias/internal definitions.