diff options
Diffstat (limited to 'sysdeps/i386/i686/multiarch')
70 files changed, 416 insertions, 985 deletions
diff --git a/sysdeps/i386/i686/multiarch/Makefile b/sysdeps/i386/i686/multiarch/Makefile index 11ce4ba1e3..700010d969 100644 --- a/sysdeps/i386/i686/multiarch/Makefile +++ b/sysdeps/i386/i686/multiarch/Makefile @@ -1,5 +1,4 @@ ifeq ($(subdir),csu) -aux += init-arch tests += test-multiarch gen-as-const-headers += ifunc-defines.sym endif @@ -25,15 +24,13 @@ sysdep_routines += bzero-sse2 memset-sse2 memcpy-ssse3 mempcpy-ssse3 \ strncase_l-c strncase-c strncase_l-ssse3 \ strcasecmp_l-sse4 strncase_l-sse4 \ bcopy-sse2-unaligned memcpy-sse2-unaligned \ - mempcpy-sse2-unaligned memmove-sse2-unaligned -ifeq (yes,$(config-cflags-sse4)) -sysdep_routines += strcspn-c strpbrk-c strspn-c + mempcpy-sse2-unaligned memmove-sse2-unaligned \ + strcspn-c strpbrk-c strspn-c CFLAGS-varshift.c += -msse4 CFLAGS-strcspn-c.c += -msse4 CFLAGS-strpbrk-c.c += -msse4 CFLAGS-strspn-c.c += -msse4 endif -endif ifeq ($(subdir),wcsmbs) sysdep_routines += wcscmp-sse2 wcscmp-c wcslen-sse2 wcslen-c \ @@ -41,7 +38,7 @@ sysdep_routines += wcscmp-sse2 wcscmp-c wcslen-sse2 wcslen-c \ wcschr-c wcsrchr-sse2 wcsrchr-c wcscpy-ssse3 wcscpy-c endif -ifeq (mathyes,$(subdir)$(config-cflags-avx)) +ifeq ($(subdir),math) libm-sysdep_routines += s_fma-fma s_fmaf-fma CFLAGS-s_fma-fma.c += -mavx -mfpmath=sse CFLAGS-s_fmaf-fma.c += -mavx -mfpmath=sse diff --git a/sysdeps/i386/i686/multiarch/Versions b/sysdeps/i386/i686/multiarch/Versions deleted file mode 100644 index 59b185ac8d..0000000000 --- a/sysdeps/i386/i686/multiarch/Versions +++ /dev/null @@ -1,5 +0,0 @@ -libc { - GLIBC_PRIVATE { - __get_cpu_features; - } -} diff --git a/sysdeps/i386/i686/multiarch/bcopy.S b/sysdeps/i386/i686/multiarch/bcopy.S index e767d97019..d5b408dfb8 100644 --- a/sysdeps/i386/i686/multiarch/bcopy.S +++ b/sysdeps/i386/i686/multiarch/bcopy.S @@ -1,6 +1,6 @@ /* Multiple versions of bcopy All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -23,51 +23,24 @@ /* Define multiple versions only for the definition in lib. */ #if IS_IN (libc) -# ifdef SHARED .text ENTRY(bcopy) .type bcopy, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __bcopy_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__bcopy_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __bcopy_sse2_unaligned@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__bcopy_sse2_unaligned) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __bcopy_ssse3@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__bcopy_ssse3) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __bcopy_ssse3_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(bcopy) -# else - .text -ENTRY(bcopy) - .type bcopy, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __bcopy_ia32, %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features - jz 2f - leal __bcopy_ssse3, %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features - jz 2f - leal __bcopy_ssse3_rep, %eax + LOAD_FUNC_GOT_EAX (__bcopy_ssse3_rep) 2: ret END(bcopy) -# endif # undef ENTRY # define ENTRY(name) \ diff --git a/sysdeps/i386/i686/multiarch/bzero.S b/sysdeps/i386/i686/multiarch/bzero.S index e8dc85fc9f..3bad4178eb 100644 --- a/sysdeps/i386/i686/multiarch/bzero.S +++ b/sysdeps/i386/i686/multiarch/bzero.S @@ -1,6 +1,6 @@ /* Multiple versions of bzero All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -23,46 +23,19 @@ /* Define multiple versions only for the definition in lib. */ #if IS_IN (libc) -# ifdef SHARED - .text -ENTRY(__bzero) - .type __bzero, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __bzero_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) - jz 2f - leal __bzero_sse2@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) - jz 2f - leal __bzero_sse2_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(__bzero) -# else .text ENTRY(__bzero) .type __bzero, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __bzero_ia32, %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__bzero_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __bzero_sse2, %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features + LOAD_FUNC_GOT_EAX ( __bzero_sse2) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __bzero_sse2_rep, %eax + LOAD_FUNC_GOT_EAX (__bzero_sse2_rep) 2: ret END(__bzero) -# endif # undef ENTRY # define ENTRY(name) \ diff --git a/sysdeps/i386/i686/multiarch/ifunc-defines.sym b/sysdeps/i386/i686/multiarch/ifunc-defines.sym index eb1538abcc..96e9cfaf61 100644 --- a/sysdeps/i386/i686/multiarch/ifunc-defines.sym +++ b/sysdeps/i386/i686/multiarch/ifunc-defines.sym @@ -4,7 +4,6 @@ -- CPU_FEATURES_SIZE sizeof (struct cpu_features) -KIND_OFFSET offsetof (struct cpu_features, kind) CPUID_OFFSET offsetof (struct cpu_features, cpuid) CPUID_SIZE sizeof (struct cpuid_registers) CPUID_EAX_OFFSET offsetof (struct cpuid_registers, eax) diff --git a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c index 92366a7b46..ef30a95432 100644 --- a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c +++ b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c @@ -1,5 +1,5 @@ /* Enumerate available IFUNC implementations of a function. i686 version. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -38,152 +38,179 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, /* Support sysdeps/i386/i686/multiarch/bcopy.S. */ IFUNC_IMPL (i, name, bcopy, - IFUNC_IMPL_ADD (array, i, bcopy, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, bcopy, HAS_CPU_FEATURE (SSSE3), __bcopy_ssse3_rep) - IFUNC_IMPL_ADD (array, i, bcopy, HAS_SSSE3, __bcopy_ssse3) - IFUNC_IMPL_ADD (array, i, bcopy, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, bcopy, HAS_CPU_FEATURE (SSSE3), + __bcopy_ssse3) + IFUNC_IMPL_ADD (array, i, bcopy, HAS_CPU_FEATURE (SSE2), __bcopy_sse2_unaligned) IFUNC_IMPL_ADD (array, i, bcopy, 1, __bcopy_ia32)) /* Support sysdeps/i386/i686/multiarch/bzero.S. */ IFUNC_IMPL (i, name, bzero, - IFUNC_IMPL_ADD (array, i, bzero, HAS_SSE2, __bzero_sse2_rep) - IFUNC_IMPL_ADD (array, i, bzero, HAS_SSE2, __bzero_sse2) + IFUNC_IMPL_ADD (array, i, bzero, HAS_CPU_FEATURE (SSE2), + __bzero_sse2_rep) + IFUNC_IMPL_ADD (array, i, bzero, HAS_CPU_FEATURE (SSE2), + __bzero_sse2) IFUNC_IMPL_ADD (array, i, bzero, 1, __bzero_ia32)) /* Support sysdeps/i386/i686/multiarch/memchr.S. */ IFUNC_IMPL (i, name, memchr, - IFUNC_IMPL_ADD (array, i, memchr, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, memchr, HAS_CPU_FEATURE (SSE2), __memchr_sse2_bsf) - IFUNC_IMPL_ADD (array, i, memchr, HAS_SSE2, __memchr_sse2) + IFUNC_IMPL_ADD (array, i, memchr, HAS_CPU_FEATURE (SSE2), + __memchr_sse2) IFUNC_IMPL_ADD (array, i, memchr, 1, __memchr_ia32)) /* Support sysdeps/i386/i686/multiarch/memcmp.S. */ IFUNC_IMPL (i, name, memcmp, - IFUNC_IMPL_ADD (array, i, memcmp, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, memcmp, HAS_CPU_FEATURE (SSE4_2), __memcmp_sse4_2) - IFUNC_IMPL_ADD (array, i, memcmp, HAS_SSSE3, __memcmp_ssse3) + IFUNC_IMPL_ADD (array, i, memcmp, HAS_CPU_FEATURE (SSSE3), + __memcmp_ssse3) IFUNC_IMPL_ADD (array, i, memcmp, 1, __memcmp_ia32)) /* Support sysdeps/i386/i686/multiarch/memmove_chk.S. */ IFUNC_IMPL (i, name, __memmove_chk, - IFUNC_IMPL_ADD (array, i, __memmove_chk, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, __memmove_chk, + HAS_CPU_FEATURE (SSSE3), __memmove_chk_ssse3_rep) - IFUNC_IMPL_ADD (array, i, __memmove_chk, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, __memmove_chk, + HAS_CPU_FEATURE (SSSE3), __memmove_chk_ssse3) - IFUNC_IMPL_ADD (array, i, __memmove_chk, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, __memmove_chk, + HAS_CPU_FEATURE (SSE2), __memmove_chk_sse2_unaligned) IFUNC_IMPL_ADD (array, i, __memmove_chk, 1, __memmove_chk_ia32)) /* Support sysdeps/i386/i686/multiarch/memmove.S. */ IFUNC_IMPL (i, name, memmove, - IFUNC_IMPL_ADD (array, i, memmove, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, memmove, HAS_CPU_FEATURE (SSSE3), __memmove_ssse3_rep) - IFUNC_IMPL_ADD (array, i, memmove, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, memmove, HAS_CPU_FEATURE (SSSE3), __memmove_ssse3) - IFUNC_IMPL_ADD (array, i, memmove, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, memmove, HAS_CPU_FEATURE (SSE2), __memmove_sse2_unaligned) IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_ia32)) /* Support sysdeps/i386/i686/multiarch/memrchr.S. */ IFUNC_IMPL (i, name, memrchr, - IFUNC_IMPL_ADD (array, i, memrchr, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, memrchr, HAS_CPU_FEATURE (SSE2), __memrchr_sse2_bsf) - IFUNC_IMPL_ADD (array, i, memrchr, HAS_SSE2, __memrchr_sse2) + IFUNC_IMPL_ADD (array, i, memrchr, HAS_CPU_FEATURE (SSE2), + __memrchr_sse2) IFUNC_IMPL_ADD (array, i, memrchr, 1, __memrchr_ia32)) /* Support sysdeps/i386/i686/multiarch/memset_chk.S. */ IFUNC_IMPL (i, name, __memset_chk, - IFUNC_IMPL_ADD (array, i, __memset_chk, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, __memset_chk, + HAS_CPU_FEATURE (SSE2), __memset_chk_sse2_rep) - IFUNC_IMPL_ADD (array, i, __memset_chk, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, __memset_chk, + HAS_CPU_FEATURE (SSE2), __memset_chk_sse2) IFUNC_IMPL_ADD (array, i, __memset_chk, 1, __memset_chk_ia32)) /* Support sysdeps/i386/i686/multiarch/memset.S. */ IFUNC_IMPL (i, name, memset, - IFUNC_IMPL_ADD (array, i, memset, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, memset, HAS_CPU_FEATURE (SSE2), __memset_sse2_rep) - IFUNC_IMPL_ADD (array, i, memset, HAS_SSE2, __memset_sse2) + IFUNC_IMPL_ADD (array, i, memset, HAS_CPU_FEATURE (SSE2), + __memset_sse2) IFUNC_IMPL_ADD (array, i, memset, 1, __memset_ia32)) /* Support sysdeps/i386/i686/multiarch/rawmemchr.S. */ IFUNC_IMPL (i, name, rawmemchr, - IFUNC_IMPL_ADD (array, i, rawmemchr, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, rawmemchr, HAS_CPU_FEATURE (SSE2), __rawmemchr_sse2_bsf) - IFUNC_IMPL_ADD (array, i, rawmemchr, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, rawmemchr, HAS_CPU_FEATURE (SSE2), __rawmemchr_sse2) IFUNC_IMPL_ADD (array, i, rawmemchr, 1, __rawmemchr_ia32)) /* Support sysdeps/i386/i686/multiarch/stpncpy.S. */ IFUNC_IMPL (i, name, stpncpy, - IFUNC_IMPL_ADD (array, i, stpncpy, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, stpncpy, HAS_CPU_FEATURE (SSSE3), __stpncpy_ssse3) - IFUNC_IMPL_ADD (array, i, stpncpy, HAS_SSE2, __stpncpy_sse2) + IFUNC_IMPL_ADD (array, i, stpncpy, HAS_CPU_FEATURE (SSE2), + __stpncpy_sse2) IFUNC_IMPL_ADD (array, i, stpncpy, 1, __stpncpy_ia32)) /* Support sysdeps/i386/i686/multiarch/stpcpy.S. */ IFUNC_IMPL (i, name, stpcpy, - IFUNC_IMPL_ADD (array, i, stpcpy, HAS_SSSE3, __stpcpy_ssse3) - IFUNC_IMPL_ADD (array, i, stpcpy, HAS_SSE2, __stpcpy_sse2) + IFUNC_IMPL_ADD (array, i, stpcpy, HAS_CPU_FEATURE (SSSE3), + __stpcpy_ssse3) + IFUNC_IMPL_ADD (array, i, stpcpy, HAS_CPU_FEATURE (SSE2), + __stpcpy_sse2) IFUNC_IMPL_ADD (array, i, stpcpy, 1, __stpcpy_ia32)) /* Support sysdeps/i386/i686/multiarch/strcasecmp.S. */ IFUNC_IMPL (i, name, strcasecmp, - IFUNC_IMPL_ADD (array, i, strcasecmp, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, strcasecmp, + HAS_CPU_FEATURE (SSE4_2), __strcasecmp_sse4_2) - IFUNC_IMPL_ADD (array, i, strcasecmp, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, strcasecmp, + HAS_CPU_FEATURE (SSSE3), __strcasecmp_ssse3) IFUNC_IMPL_ADD (array, i, strcasecmp, 1, __strcasecmp_ia32)) /* Support sysdeps/i386/i686/multiarch/strcasecmp_l.S. */ IFUNC_IMPL (i, name, strcasecmp_l, - IFUNC_IMPL_ADD (array, i, strcasecmp_l, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, strcasecmp_l, + HAS_CPU_FEATURE (SSE4_2), __strcasecmp_l_sse4_2) - IFUNC_IMPL_ADD (array, i, strcasecmp_l, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, strcasecmp_l, + HAS_CPU_FEATURE (SSSE3), __strcasecmp_l_ssse3) IFUNC_IMPL_ADD (array, i, strcasecmp_l, 1, __strcasecmp_l_ia32)) /* Support sysdeps/i386/i686/multiarch/strcat.S. */ IFUNC_IMPL (i, name, strcat, - IFUNC_IMPL_ADD (array, i, strcat, HAS_SSSE3, __strcat_ssse3) - IFUNC_IMPL_ADD (array, i, strcat, HAS_SSE2, __strcat_sse2) + IFUNC_IMPL_ADD (array, i, strcat, HAS_CPU_FEATURE (SSSE3), + __strcat_ssse3) + IFUNC_IMPL_ADD (array, i, strcat, HAS_CPU_FEATURE (SSE2), + __strcat_sse2) IFUNC_IMPL_ADD (array, i, strcat, 1, __strcat_ia32)) /* Support sysdeps/i386/i686/multiarch/strchr.S. */ IFUNC_IMPL (i, name, strchr, - IFUNC_IMPL_ADD (array, i, strchr, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, strchr, HAS_CPU_FEATURE (SSE2), __strchr_sse2_bsf) - IFUNC_IMPL_ADD (array, i, strchr, HAS_SSE2, __strchr_sse2) + IFUNC_IMPL_ADD (array, i, strchr, HAS_CPU_FEATURE (SSE2), + __strchr_sse2) IFUNC_IMPL_ADD (array, i, strchr, 1, __strchr_ia32)) /* Support sysdeps/i386/i686/multiarch/strcmp.S. */ IFUNC_IMPL (i, name, strcmp, - IFUNC_IMPL_ADD (array, i, strcmp, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, strcmp, HAS_CPU_FEATURE (SSE4_2), __strcmp_sse4_2) - IFUNC_IMPL_ADD (array, i, strcmp, HAS_SSSE3, __strcmp_ssse3) + IFUNC_IMPL_ADD (array, i, strcmp, HAS_CPU_FEATURE (SSSE3), + __strcmp_ssse3) IFUNC_IMPL_ADD (array, i, strcmp, 1, __strcmp_ia32)) /* Support sysdeps/i386/i686/multiarch/strcpy.S. */ IFUNC_IMPL (i, name, strcpy, - IFUNC_IMPL_ADD (array, i, strcpy, HAS_SSSE3, __strcpy_ssse3) - IFUNC_IMPL_ADD (array, i, strcpy, HAS_SSE2, __strcpy_sse2) + IFUNC_IMPL_ADD (array, i, strcpy, HAS_CPU_FEATURE (SSSE3), + __strcpy_ssse3) + IFUNC_IMPL_ADD (array, i, strcpy, HAS_CPU_FEATURE (SSE2), + __strcpy_sse2) IFUNC_IMPL_ADD (array, i, strcpy, 1, __strcpy_ia32)) /* Support sysdeps/i386/i686/multiarch/strcspn.S. */ IFUNC_IMPL (i, name, strcspn, - IFUNC_IMPL_ADD (array, i, strcspn, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, strcspn, HAS_CPU_FEATURE (SSE4_2), __strcspn_sse42) IFUNC_IMPL_ADD (array, i, strcspn, 1, __strcspn_ia32)) /* Support sysdeps/i386/i686/multiarch/strncase.S. */ IFUNC_IMPL (i, name, strncasecmp, - IFUNC_IMPL_ADD (array, i, strncasecmp, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, strncasecmp, + HAS_CPU_FEATURE (SSE4_2), __strncasecmp_sse4_2) - IFUNC_IMPL_ADD (array, i, strncasecmp, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, strncasecmp, + HAS_CPU_FEATURE (SSSE3), __strncasecmp_ssse3) IFUNC_IMPL_ADD (array, i, strncasecmp, 1, __strncasecmp_ia32)) @@ -191,136 +218,156 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, /* Support sysdeps/i386/i686/multiarch/strncase_l.S. */ IFUNC_IMPL (i, name, strncasecmp_l, IFUNC_IMPL_ADD (array, i, strncasecmp_l, - HAS_SSE4_2, __strncasecmp_l_sse4_2) + HAS_CPU_FEATURE (SSE4_2), + __strncasecmp_l_sse4_2) IFUNC_IMPL_ADD (array, i, strncasecmp_l, - HAS_SSSE3, __strncasecmp_l_ssse3) + HAS_CPU_FEATURE (SSSE3), + __strncasecmp_l_ssse3) IFUNC_IMPL_ADD (array, i, strncasecmp_l, 1, __strncasecmp_l_ia32)) /* Support sysdeps/i386/i686/multiarch/strncat.S. */ IFUNC_IMPL (i, name, strncat, - IFUNC_IMPL_ADD (array, i, strncat, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, strncat, HAS_CPU_FEATURE (SSSE3), __strncat_ssse3) - IFUNC_IMPL_ADD (array, i, strncat, HAS_SSE2, __strncat_sse2) + IFUNC_IMPL_ADD (array, i, strncat, HAS_CPU_FEATURE (SSE2), + __strncat_sse2) IFUNC_IMPL_ADD (array, i, strncat, 1, __strncat_ia32)) /* Support sysdeps/i386/i686/multiarch/strncpy.S. */ IFUNC_IMPL (i, name, strncpy, - IFUNC_IMPL_ADD (array, i, strncpy, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, strncpy, HAS_CPU_FEATURE (SSSE3), __strncpy_ssse3) - IFUNC_IMPL_ADD (array, i, strncpy, HAS_SSE2, __strncpy_sse2) + IFUNC_IMPL_ADD (array, i, strncpy, HAS_CPU_FEATURE (SSE2), + __strncpy_sse2) IFUNC_IMPL_ADD (array, i, strncpy, 1, __strncpy_ia32)) /* Support sysdeps/i386/i686/multiarch/strnlen.S. */ IFUNC_IMPL (i, name, strnlen, - IFUNC_IMPL_ADD (array, i, strnlen, HAS_SSE2, __strnlen_sse2) + IFUNC_IMPL_ADD (array, i, strnlen, HAS_CPU_FEATURE (SSE2), + __strnlen_sse2) IFUNC_IMPL_ADD (array, i, strnlen, 1, __strnlen_ia32)) /* Support sysdeps/i386/i686/multiarch/strpbrk.S. */ IFUNC_IMPL (i, name, strpbrk, - IFUNC_IMPL_ADD (array, i, strpbrk, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, strpbrk, HAS_CPU_FEATURE (SSE4_2), __strpbrk_sse42) IFUNC_IMPL_ADD (array, i, strpbrk, 1, __strpbrk_ia32)) /* Support sysdeps/i386/i686/multiarch/strrchr.S. */ IFUNC_IMPL (i, name, strrchr, - IFUNC_IMPL_ADD (array, i, strrchr, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, strrchr, HAS_CPU_FEATURE (SSE2), __strrchr_sse2_bsf) - IFUNC_IMPL_ADD (array, i, strrchr, HAS_SSE2, __strrchr_sse2) + IFUNC_IMPL_ADD (array, i, strrchr, HAS_CPU_FEATURE (SSE2), + __strrchr_sse2) IFUNC_IMPL_ADD (array, i, strrchr, 1, __strrchr_ia32)) /* Support sysdeps/i386/i686/multiarch/strspn.S. */ IFUNC_IMPL (i, name, strspn, - IFUNC_IMPL_ADD (array, i, strspn, HAS_SSE4_2, __strspn_sse42) + IFUNC_IMPL_ADD (array, i, strspn, HAS_CPU_FEATURE (SSE4_2), + __strspn_sse42) IFUNC_IMPL_ADD (array, i, strspn, 1, __strspn_ia32)) /* Support sysdeps/i386/i686/multiarch/wcschr.S. */ IFUNC_IMPL (i, name, wcschr, - IFUNC_IMPL_ADD (array, i, wcschr, HAS_SSE2, __wcschr_sse2) + IFUNC_IMPL_ADD (array, i, wcschr, HAS_CPU_FEATURE (SSE2), + __wcschr_sse2) IFUNC_IMPL_ADD (array, i, wcschr, 1, __wcschr_ia32)) /* Support sysdeps/i386/i686/multiarch/wcscmp.S. */ IFUNC_IMPL (i, name, wcscmp, - IFUNC_IMPL_ADD (array, i, wcscmp, HAS_SSE2, __wcscmp_sse2) + IFUNC_IMPL_ADD (array, i, wcscmp, HAS_CPU_FEATURE (SSE2), + __wcscmp_sse2) IFUNC_IMPL_ADD (array, i, wcscmp, 1, __wcscmp_ia32)) /* Support sysdeps/i386/i686/multiarch/wcscpy.S. */ IFUNC_IMPL (i, name, wcscpy, - IFUNC_IMPL_ADD (array, i, wcscpy, HAS_SSSE3, __wcscpy_ssse3) + IFUNC_IMPL_ADD (array, i, wcscpy, HAS_CPU_FEATURE (SSSE3), + __wcscpy_ssse3) IFUNC_IMPL_ADD (array, i, wcscpy, 1, __wcscpy_ia32)) /* Support sysdeps/i386/i686/multiarch/wcslen.S. */ IFUNC_IMPL (i, name, wcslen, - IFUNC_IMPL_ADD (array, i, wcslen, HAS_SSE2, __wcslen_sse2) + IFUNC_IMPL_ADD (array, i, wcslen, HAS_CPU_FEATURE (SSE2), + __wcslen_sse2) IFUNC_IMPL_ADD (array, i, wcslen, 1, __wcslen_ia32)) /* Support sysdeps/i386/i686/multiarch/wcsrchr.S. */ IFUNC_IMPL (i, name, wcsrchr, - IFUNC_IMPL_ADD (array, i, wcsrchr, HAS_SSE2, __wcsrchr_sse2) + IFUNC_IMPL_ADD (array, i, wcsrchr, HAS_CPU_FEATURE (SSE2), + __wcsrchr_sse2) IFUNC_IMPL_ADD (array, i, wcsrchr, 1, __wcsrchr_ia32)) /* Support sysdeps/i386/i686/multiarch/wmemcmp.S. */ IFUNC_IMPL (i, name, wmemcmp, - IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_CPU_FEATURE (SSE4_2), __wmemcmp_sse4_2) - IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_CPU_FEATURE (SSSE3), __wmemcmp_ssse3) IFUNC_IMPL_ADD (array, i, wmemcmp, 1, __wmemcmp_ia32)) #ifdef SHARED /* Support sysdeps/i386/i686/multiarch/memcpy_chk.S. */ IFUNC_IMPL (i, name, __memcpy_chk, - IFUNC_IMPL_ADD (array, i, __memcpy_chk, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, __memcpy_chk, + HAS_CPU_FEATURE (SSSE3), __memcpy_chk_ssse3_rep) - IFUNC_IMPL_ADD (array, i, __memcpy_chk, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, __memcpy_chk, + HAS_CPU_FEATURE (SSSE3), __memcpy_chk_ssse3) - IFUNC_IMPL_ADD (array, i, __memcpy_chk, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, __memcpy_chk, + HAS_CPU_FEATURE (SSE2), __memcpy_chk_sse2_unaligned) IFUNC_IMPL_ADD (array, i, __memcpy_chk, 1, __memcpy_chk_ia32)) /* Support sysdeps/i386/i686/multiarch/memcpy.S. */ IFUNC_IMPL (i, name, memcpy, - IFUNC_IMPL_ADD (array, i, memcpy, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, memcpy, HAS_CPU_FEATURE (SSSE3), __memcpy_ssse3_rep) - IFUNC_IMPL_ADD (array, i, memcpy, HAS_SSSE3, __memcpy_ssse3) - IFUNC_IMPL_ADD (array, i, memcpy, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, memcpy, HAS_CPU_FEATURE (SSSE3), + __memcpy_ssse3) + IFUNC_IMPL_ADD (array, i, memcpy, HAS_CPU_FEATURE (SSE2), __memcpy_sse2_unaligned) IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_ia32)) /* Support sysdeps/i386/i686/multiarch/mempcpy_chk.S. */ IFUNC_IMPL (i, name, __mempcpy_chk, - IFUNC_IMPL_ADD (array, i, __mempcpy_chk, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, __mempcpy_chk, + HAS_CPU_FEATURE (SSSE3), __mempcpy_chk_ssse3_rep) - IFUNC_IMPL_ADD (array, i, __mempcpy_chk, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, __mempcpy_chk, + HAS_CPU_FEATURE (SSSE3), __mempcpy_chk_ssse3) - IFUNC_IMPL_ADD (array, i, __mempcpy_chk, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, __mempcpy_chk, + HAS_CPU_FEATURE (SSE2), __mempcpy_chk_sse2_unaligned) IFUNC_IMPL_ADD (array, i, __mempcpy_chk, 1, __mempcpy_chk_ia32)) /* Support sysdeps/i386/i686/multiarch/mempcpy.S. */ IFUNC_IMPL (i, name, mempcpy, - IFUNC_IMPL_ADD (array, i, mempcpy, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, mempcpy, HAS_CPU_FEATURE (SSSE3), __mempcpy_ssse3_rep) - IFUNC_IMPL_ADD (array, i, mempcpy, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, mempcpy, HAS_CPU_FEATURE (SSSE3), __mempcpy_ssse3) - IFUNC_IMPL_ADD (array, i, mempcpy, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, mempcpy, HAS_CPU_FEATURE (SSE2), __mempcpy_sse2_unaligned) IFUNC_IMPL_ADD (array, i, mempcpy, 1, __mempcpy_ia32)) /* Support sysdeps/i386/i686/multiarch/strlen.S. */ IFUNC_IMPL (i, name, strlen, - IFUNC_IMPL_ADD (array, i, strlen, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, strlen, HAS_CPU_FEATURE (SSE2), __strlen_sse2_bsf) - IFUNC_IMPL_ADD (array, i, strlen, HAS_SSE2, __strlen_sse2) + IFUNC_IMPL_ADD (array, i, strlen, HAS_CPU_FEATURE (SSE2), + __strlen_sse2) IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_ia32)) /* Support sysdeps/i386/i686/multiarch/strncmp.S. */ IFUNC_IMPL (i, name, strncmp, - IFUNC_IMPL_ADD (array, i, strncmp, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, strncmp, HAS_CPU_FEATURE (SSE4_2), __strncmp_sse4_2) - IFUNC_IMPL_ADD (array, i, strncmp, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, strncmp, HAS_CPU_FEATURE (SSSE3), __strncmp_ssse3) IFUNC_IMPL_ADD (array, i, strncmp, 1, __strncmp_ia32)) #endif diff --git a/sysdeps/i386/i686/multiarch/init-arch.c b/sysdeps/i386/i686/multiarch/init-arch.c deleted file mode 100644 index 00a94d83dc..0000000000 --- a/sysdeps/i386/i686/multiarch/init-arch.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/x86_64/multiarch/init-arch.c> diff --git a/sysdeps/i386/i686/multiarch/init-arch.h b/sysdeps/i386/i686/multiarch/init-arch.h deleted file mode 100644 index cd2d0befee..0000000000 --- a/sysdeps/i386/i686/multiarch/init-arch.h +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/x86_64/multiarch/init-arch.h> diff --git a/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S index a5ae86a7ff..5d48898ffa 100644 --- a/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S +++ b/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S @@ -1,5 +1,5 @@ /* Optimized memchr with sse2 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memchr-sse2.S b/sysdeps/i386/i686/multiarch/memchr-sse2.S index ae40677278..83930b7d38 100644 --- a/sysdeps/i386/i686/multiarch/memchr-sse2.S +++ b/sysdeps/i386/i686/multiarch/memchr-sse2.S @@ -1,5 +1,5 @@ /* Optimized memchr with sse2 without bsf - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memchr.S b/sysdeps/i386/i686/multiarch/memchr.S index 02994d055e..08e7489f3e 100644 --- a/sysdeps/i386/i686/multiarch/memchr.S +++ b/sysdeps/i386/i686/multiarch/memchr.S @@ -1,6 +1,6 @@ /* Multiple versions of memchr All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -22,46 +22,22 @@ #include <init-arch.h> #if IS_IN (libc) -# define CFI_POP(REG) \ - cfi_adjust_cfa_offset (-4); \ - cfi_restore (REG) - -# define CFI_PUSH(REG) \ - cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (REG, 0) - .text ENTRY(__memchr) .type __memchr, @gnu_indirect_function - pushl %ebx - CFI_PUSH (%ebx) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features - -1: testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + HAS_CPU_FEATURE (SSE2) jz 2f - testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx) + HAS_ARCH_FEATURE (Slow_BSF) jz 3f - leal __memchr_sse2@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) + LOAD_FUNC_GOT_EAX ( __memchr_sse2) ret - CFI_PUSH (%ebx) - -2: leal __memchr_ia32@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) +2: LOAD_FUNC_GOT_EAX (__memchr_ia32) ret - CFI_PUSH (%ebx) - -3: leal __memchr_sse2_bsf@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) +3: LOAD_FUNC_GOT_EAX (__memchr_sse2_bsf) ret END(__memchr) diff --git a/sysdeps/i386/i686/multiarch/memcmp-sse4.S b/sysdeps/i386/i686/multiarch/memcmp-sse4.S index b3756f4a00..e3e01600f8 100644 --- a/sysdeps/i386/i686/multiarch/memcmp-sse4.S +++ b/sysdeps/i386/i686/multiarch/memcmp-sse4.S @@ -1,5 +1,5 @@ /* memcmp with SSE4.2, wmemcmp with SSE4.2 - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memcmp-ssse3.S b/sysdeps/i386/i686/multiarch/memcmp-ssse3.S index ea2a25b216..f59bfcb0c5 100644 --- a/sysdeps/i386/i686/multiarch/memcmp-ssse3.S +++ b/sysdeps/i386/i686/multiarch/memcmp-ssse3.S @@ -1,5 +1,5 @@ /* memcmp with SSSE3, wmemcmp with SSSE3 - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memcmp.S b/sysdeps/i386/i686/multiarch/memcmp.S index 6b607ebd3b..059a78baa7 100644 --- a/sysdeps/i386/i686/multiarch/memcmp.S +++ b/sysdeps/i386/i686/multiarch/memcmp.S @@ -1,6 +1,6 @@ /* Multiple versions of memcmp All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -23,46 +23,19 @@ /* Define multiple versions only for the definition in libc. */ #if IS_IN (libc) -# ifdef SHARED - .text -ENTRY(memcmp) - .type memcmp, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __memcmp_ia32@GOTOFF(%ebx), %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) - jz 2f - leal __memcmp_ssse3@GOTOFF(%ebx), %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) - jz 2f - leal __memcmp_sse4_2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(memcmp) -# else .text ENTRY(memcmp) .type memcmp, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __memcmp_ia32, %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__memcmp_ia32) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __memcmp_ssse3, %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features + LOAD_FUNC_GOT_EAX (__memcmp_ssse3) + HAS_CPU_FEATURE (SSE4_2) jz 2f - leal __memcmp_sse4_2, %eax + LOAD_FUNC_GOT_EAX (__memcmp_sse4_2) 2: ret END(memcmp) -# endif # undef ENTRY # define ENTRY(name) \ diff --git a/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S b/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S index 8215c70b15..76f34291a3 100644 --- a/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S +++ b/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S @@ -1,5 +1,5 @@ /* memcpy optimized with SSE2 unaligned memory access instructions. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S b/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S index 08d877c03a..460c37e39a 100644 --- a/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S +++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S @@ -1,5 +1,5 @@ /* memcpy with SSSE3 and REP string. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S index 27ab6a2c3e..c694dc3ca9 100644 --- a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S +++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S @@ -1,5 +1,5 @@ /* memcpy with SSSE3 - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memcpy.S b/sysdeps/i386/i686/multiarch/memcpy.S index c6d20bd8e0..27913ea37a 100644 --- a/sysdeps/i386/i686/multiarch/memcpy.S +++ b/sysdeps/i386/i686/multiarch/memcpy.S @@ -1,6 +1,6 @@ /* Multiple versions of memcpy All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -28,29 +28,20 @@ .text ENTRY(memcpy) .type memcpy, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __memcpy_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__memcpy_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __memcpy_sse2_unaligned@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memcpy_sse2_unaligned) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __memcpy_ssse3@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memcpy_ssse3) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __memcpy_ssse3_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__memcpy_ssse3_rep) +2: ret END(memcpy) # undef ENTRY diff --git a/sysdeps/i386/i686/multiarch/memcpy_chk.S b/sysdeps/i386/i686/multiarch/memcpy_chk.S index 93995879f8..39bc3c25be 100644 --- a/sysdeps/i386/i686/multiarch/memcpy_chk.S +++ b/sysdeps/i386/i686/multiarch/memcpy_chk.S @@ -1,6 +1,6 @@ /* Multiple versions of __memcpy_chk All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -29,29 +29,20 @@ .text ENTRY(__memcpy_chk) .type __memcpy_chk, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __memcpy_chk_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__memcpy_chk_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __memcpy_chk_sse2_unaligned@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memcpy_chk_sse2_unaligned) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __memcpy_chk_ssse3@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memcpy_chk_ssse3) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __memcpy_chk_ssse3_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__memcpy_chk_ssse3_rep) +2: ret END(__memcpy_chk) # else # include "../memcpy_chk.S" diff --git a/sysdeps/i386/i686/multiarch/memmove.S b/sysdeps/i386/i686/multiarch/memmove.S index 70334639ba..725a421eab 100644 --- a/sysdeps/i386/i686/multiarch/memmove.S +++ b/sysdeps/i386/i686/multiarch/memmove.S @@ -1,6 +1,6 @@ /* Multiple versions of memmove All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -23,37 +23,28 @@ /* Define multiple versions only for the definition in lib. */ #if IS_IN (libc) -# ifdef SHARED .text ENTRY(memmove) .type memmove, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __memmove_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__memmove_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __memmove_sse2_unaligned@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memmove_sse2_unaligned) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __memmove_ssse3@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memmove_ssse3) + HAS_ARCH_FEATURE (Fast_Rep_String) jz 2f - leal __memmove_ssse3_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__memmove_ssse3_rep) +2: ret END(memmove) -# undef ENTRY -# define ENTRY(name) \ +# ifdef SHARED +# undef ENTRY +# define ENTRY(name) \ .type __memmove_ia32, @function; \ .p2align 4; \ .globl __memmove_ia32; \ @@ -61,29 +52,8 @@ END(memmove) __memmove_ia32: cfi_startproc; \ CALL_MCOUNT # else - .text -ENTRY(memmove) - .type memmove, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __memmove_ia32, %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features - jz 2f - leal __memmove_sse2_unaligned, %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features - jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features - jz 2f - leal __memmove_ssse3, %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features - jz 2f - leal __memmove_ssse3_rep, %eax -2: ret -END(memmove) - -# undef ENTRY -# define ENTRY(name) \ +# undef ENTRY +# define ENTRY(name) \ .type __memmove_ia32, @function; \ .globl __memmove_ia32; \ .p2align 4; \ diff --git a/sysdeps/i386/i686/multiarch/memmove_chk.S b/sysdeps/i386/i686/multiarch/memmove_chk.S index 2b576d4960..c27892d41b 100644 --- a/sysdeps/i386/i686/multiarch/memmove_chk.S +++ b/sysdeps/i386/i686/multiarch/memmove_chk.S @@ -1,6 +1,6 @@ /* Multiple versions of __memmove_chk All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -23,56 +23,26 @@ /* Define multiple versions only for the definition in lib. */ #if IS_IN (libc) -# ifdef SHARED .text ENTRY(__memmove_chk) .type __memmove_chk, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __memmove_chk_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__memmove_chk_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __memmove_chk_sse2_unaligned@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memmove_chk_sse2_unaligned) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __memmove_chk_ssse3@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memmove_chk_ssse3) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __memmove_chk_ssse3_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(__memmove_chk) -# else - .text -ENTRY(__memmove_chk) - .type __memmove_chk, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __memmove_chk_ia32, %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features - jz 2f - leal __memmove_chk_sse2_unaligned, %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features - jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features - jz 2f - leal __memmove_chk_ssse3, %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features - jz 2f - leal __memmove_chk_ssse3_rep, %eax + LOAD_FUNC_GOT_EAX (__memmove_chk_ssse3_rep) 2: ret END(__memmove_chk) +# ifndef SHARED .type __memmove_chk_sse2_unaligned, @function .p2align 4; __memmove_chk_sse2_unaligned: diff --git a/sysdeps/i386/i686/multiarch/mempcpy.S b/sysdeps/i386/i686/multiarch/mempcpy.S index 39c934eb49..141ff2e395 100644 --- a/sysdeps/i386/i686/multiarch/mempcpy.S +++ b/sysdeps/i386/i686/multiarch/mempcpy.S @@ -1,6 +1,6 @@ /* Multiple versions of mempcpy All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -28,29 +28,20 @@ .text ENTRY(__mempcpy) .type __mempcpy, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __mempcpy_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__mempcpy_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __mempcpy_sse2_unaligned@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__mempcpy_sse2_unaligned) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __mempcpy_ssse3@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__mempcpy_ssse3) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __mempcpy_ssse3_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__mempcpy_ssse3_rep) +2: ret END(__mempcpy) # undef ENTRY diff --git a/sysdeps/i386/i686/multiarch/mempcpy_chk.S b/sysdeps/i386/i686/multiarch/mempcpy_chk.S index b6fa202833..2788b663c2 100644 --- a/sysdeps/i386/i686/multiarch/mempcpy_chk.S +++ b/sysdeps/i386/i686/multiarch/mempcpy_chk.S @@ -1,6 +1,6 @@ /* Multiple versions of __mempcpy_chk All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -29,29 +29,20 @@ .text ENTRY(__mempcpy_chk) .type __mempcpy_chk, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __mempcpy_chk_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__mempcpy_chk_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __mempcpy_chk_sse2_unaligned@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__mempcpy_chk_sse2_unaligned) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __mempcpy_chk_ssse3@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__mempcpy_chk_ssse3) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __mempcpy_chk_ssse3_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__mempcpy_chk_ssse3_rep) +2: ret END(__mempcpy_chk) # else # include "../mempcpy_chk.S" diff --git a/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S index 043e1bbd23..cf5555cf62 100644 --- a/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S +++ b/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S @@ -1,5 +1,5 @@ /* Optimized memrchr with sse2 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memrchr-sse2.S b/sysdeps/i386/i686/multiarch/memrchr-sse2.S index 65e3c8bc73..5be8332438 100644 --- a/sysdeps/i386/i686/multiarch/memrchr-sse2.S +++ b/sysdeps/i386/i686/multiarch/memrchr-sse2.S @@ -1,5 +1,5 @@ /* Optimized memrchr with sse2 without bsf - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memrchr.S b/sysdeps/i386/i686/multiarch/memrchr.S index 321e0b7e4e..bc1ff805af 100644 --- a/sysdeps/i386/i686/multiarch/memrchr.S +++ b/sysdeps/i386/i686/multiarch/memrchr.S @@ -1,6 +1,6 @@ /* Multiple versions of memrchr All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -22,46 +22,22 @@ #include <init-arch.h> #if IS_IN (libc) -# define CFI_POP(REG) \ - cfi_adjust_cfa_offset (-4); \ - cfi_restore (REG) - -# define CFI_PUSH(REG) \ - cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (REG, 0) - .text ENTRY(__memrchr) .type __memrchr, @gnu_indirect_function - pushl %ebx - CFI_PUSH (%ebx) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features - -1: testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + HAS_CPU_FEATURE (SSE2) jz 2f - testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx) + HAS_ARCH_FEATURE (Slow_BSF) jz 3f - leal __memrchr_sse2@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) + LOAD_FUNC_GOT_EAX (__memrchr_sse2) ret - CFI_PUSH (%ebx) - -2: leal __memrchr_ia32@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) +2: LOAD_FUNC_GOT_EAX (__memrchr_ia32) ret - CFI_PUSH (%ebx) - -3: leal __memrchr_sse2_bsf@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) +3: LOAD_FUNC_GOT_EAX (__memrchr_sse2_bsf) ret END(__memrchr) diff --git a/sysdeps/i386/i686/multiarch/memset-sse2-rep.S b/sysdeps/i386/i686/multiarch/memset-sse2-rep.S index 9c8f232c42..153ae6fdaf 100644 --- a/sysdeps/i386/i686/multiarch/memset-sse2-rep.S +++ b/sysdeps/i386/i686/multiarch/memset-sse2-rep.S @@ -1,5 +1,5 @@ /* memset with SSE2 and REP string. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memset-sse2.S b/sysdeps/i386/i686/multiarch/memset-sse2.S index d03e647a3f..4cac1c7b22 100644 --- a/sysdeps/i386/i686/multiarch/memset-sse2.S +++ b/sysdeps/i386/i686/multiarch/memset-sse2.S @@ -1,5 +1,5 @@ /* memset with SSE2 - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memset.S b/sysdeps/i386/i686/multiarch/memset.S index 6d7d919409..268df0c873 100644 --- a/sysdeps/i386/i686/multiarch/memset.S +++ b/sysdeps/i386/i686/multiarch/memset.S @@ -1,6 +1,6 @@ /* Multiple versions of memset All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -23,46 +23,19 @@ /* Define multiple versions only for the definition in lib. */ #if IS_IN (libc) -# ifdef SHARED - .text -ENTRY(memset) - .type memset, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __memset_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) - jz 2f - leal __memset_sse2@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) - jz 2f - leal __memset_sse2_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(memset) -# else .text ENTRY(memset) .type memset, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __memset_ia32, %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__memset_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __memset_sse2, %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features + LOAD_FUNC_GOT_EAX (__memset_sse2) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __memset_sse2_rep, %eax + LOAD_FUNC_GOT_EAX (__memset_sse2_rep) 2: ret END(memset) -# endif # undef ENTRY # define ENTRY(name) \ diff --git a/sysdeps/i386/i686/multiarch/memset_chk.S b/sysdeps/i386/i686/multiarch/memset_chk.S index a770c0d9e2..d18b53f7e3 100644 --- a/sysdeps/i386/i686/multiarch/memset_chk.S +++ b/sysdeps/i386/i686/multiarch/memset_chk.S @@ -1,6 +1,6 @@ /* Multiple versions of __memset_chk All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -23,50 +23,26 @@ /* Define multiple versions only for the definition in lib. */ #if IS_IN (libc) -# ifdef SHARED .text ENTRY(__memset_chk) .type __memset_chk, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __memset_chk_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__memset_chk_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __memset_chk_sse2@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memset_chk_sse2) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __memset_chk_sse2_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__memset_chk_sse2_rep) +2: ret END(__memset_chk) +# ifdef SHARED strong_alias (__memset_chk, __memset_zero_constant_len_parameter) .section .gnu.warning.__memset_zero_constant_len_parameter .string "memset used with constant zero length parameter; this could be due to transposed parameters" # else .text -ENTRY(__memset_chk) - .type __memset_chk, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __memset_chk_ia32, %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features - jz 2f - leal __memset_chk_sse2, %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features - jz 2f - leal __memset_chk_sse2_rep, %eax -2: ret -END(__memset_chk) - .type __memset_chk_sse2, @function .p2align 4; __memset_chk_sse2: diff --git a/sysdeps/i386/i686/multiarch/rawmemchr.S b/sysdeps/i386/i686/multiarch/rawmemchr.S index c2b7ee647e..f53978348d 100644 --- a/sysdeps/i386/i686/multiarch/rawmemchr.S +++ b/sysdeps/i386/i686/multiarch/rawmemchr.S @@ -1,6 +1,6 @@ /* Multiple versions of rawmemchr All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -22,46 +22,22 @@ #include <init-arch.h> #if IS_IN (libc) -# define CFI_POP(REG) \ - cfi_adjust_cfa_offset (-4); \ - cfi_restore (REG) - -# define CFI_PUSH(REG) \ - cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (REG, 0) - .text ENTRY(__rawmemchr) .type __rawmemchr, @gnu_indirect_function - pushl %ebx - CFI_PUSH (%ebx) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features - -1: testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + HAS_CPU_FEATURE (SSE2) jz 2f - testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx) + HAS_ARCH_FEATURE (Slow_BSF) jz 3f - leal __rawmemchr_sse2@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) + LOAD_FUNC_GOT_EAX (__rawmemchr_sse2) ret - CFI_PUSH (%ebx) - -2: leal __rawmemchr_ia32@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) +2: LOAD_FUNC_GOT_EAX (__rawmemchr_ia32) ret - CFI_PUSH (%ebx) - -3: leal __rawmemchr_sse2_bsf@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) +3: LOAD_FUNC_GOT_EAX (__rawmemchr_sse2_bsf) ret END(__rawmemchr) diff --git a/sysdeps/i386/i686/multiarch/s_fma-fma.c b/sysdeps/i386/i686/multiarch/s_fma-fma.c index 1a8b48bd58..60e5b9a32d 100644 --- a/sysdeps/i386/i686/multiarch/s_fma-fma.c +++ b/sysdeps/i386/i686/multiarch/s_fma-fma.c @@ -1,5 +1,5 @@ /* FMA version of fma. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -19,11 +19,9 @@ #include <config.h> -#ifdef HAVE_AVX_SUPPORT double __fma_fma (double x, double y, double z) { asm ("vfmadd213sd %3, %2, %0" : "=x" (x) : "0" (x), "x" (y), "xm" (z)); return x; } -#endif diff --git a/sysdeps/i386/i686/multiarch/s_fma.c b/sysdeps/i386/i686/multiarch/s_fma.c index dd70f78fd7..acc59a8c93 100644 --- a/sysdeps/i386/i686/multiarch/s_fma.c +++ b/sysdeps/i386/i686/multiarch/s_fma.c @@ -1,5 +1,5 @@ /* Multiple versions of fma. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -19,17 +19,16 @@ #include <config.h> -#ifdef HAVE_AVX_SUPPORT #include <math.h> #include <init-arch.h> extern double __fma_ia32 (double x, double y, double z) attribute_hidden; extern double __fma_fma (double x, double y, double z) attribute_hidden; -libm_ifunc (__fma, HAS_FMA ? __fma_fma : __fma_ia32); +libm_ifunc (__fma, + HAS_ARCH_FEATURE (FMA_Usable) ? __fma_fma : __fma_ia32); weak_alias (__fma, fma) -# define __fma __fma_ia32 -#endif +#define __fma __fma_ia32 #include <sysdeps/ieee754/ldbl-96/s_fma.c> diff --git a/sysdeps/i386/i686/multiarch/s_fmaf-fma.c b/sysdeps/i386/i686/multiarch/s_fmaf-fma.c index 1775ef5dd0..ff2de65a80 100644 --- a/sysdeps/i386/i686/multiarch/s_fmaf-fma.c +++ b/sysdeps/i386/i686/multiarch/s_fmaf-fma.c @@ -1,5 +1,5 @@ /* FMA version of fmaf. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -19,11 +19,9 @@ #include <config.h> -#ifdef HAVE_AVX_SUPPORT float __fmaf_fma (float x, float y, float z) { asm ("vfmadd213ss %3, %2, %0" : "=x" (x) : "0" (x), "x" (y), "xm" (z)); return x; } -#endif diff --git a/sysdeps/i386/i686/multiarch/s_fmaf.c b/sysdeps/i386/i686/multiarch/s_fmaf.c index 9ffa4f15d9..a4b86cf39e 100644 --- a/sysdeps/i386/i686/multiarch/s_fmaf.c +++ b/sysdeps/i386/i686/multiarch/s_fmaf.c @@ -1,5 +1,5 @@ /* Multiple versions of fmaf. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -19,17 +19,16 @@ #include <config.h> -#ifdef HAVE_AVX_SUPPORT #include <math.h> #include <init-arch.h> extern float __fmaf_ia32 (float x, float y, float z) attribute_hidden; extern float __fmaf_fma (float x, float y, float z) attribute_hidden; -libm_ifunc (__fmaf, HAS_FMA ? __fmaf_fma : __fmaf_ia32); +libm_ifunc (__fmaf, + HAS_ARCH_FEATURE (FMA_Usable) ? __fmaf_fma : __fmaf_ia32); weak_alias (__fmaf, fmaf) -# define __fmaf __fmaf_ia32 -#endif +#define __fmaf __fmaf_ia32 #include <sysdeps/ieee754/dbl-64/s_fmaf.c> diff --git a/sysdeps/i386/i686/multiarch/strcasecmp.S b/sysdeps/i386/i686/multiarch/strcasecmp.S index c30ac3a8bd..61f17718bc 100644 --- a/sysdeps/i386/i686/multiarch/strcasecmp.S +++ b/sysdeps/i386/i686/multiarch/strcasecmp.S @@ -1,6 +1,6 @@ /* Entry point for multi-version x86 strcasecmp. All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,49 +20,20 @@ #include <sysdep.h> #include <init-arch.h> -#ifdef SHARED .text ENTRY(__strcasecmp) .type __strcasecmp, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __strcasecmp_ia32@GOTOFF(%ebx), %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__strcasecmp_ia32) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __strcasecmp_ssse3@GOTOFF(%ebx), %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__strcasecmp_ssse3) + HAS_CPU_FEATURE (SSE4_2) jz 2f - testl $bit_Slow_SSE4_2, FEATURE_OFFSET+index_Slow_SSE4_2+__cpu_features@GOTOFF(%ebx) + HAS_ARCH_FEATURE (Slow_SSE4_2) jnz 2f - leal __strcasecmp_sse4_2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(__strcasecmp) -#else - .text -ENTRY(__strcasecmp) - .type __strcasecmp, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __strcasecmp_ia32, %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features - jz 2f - leal __strcasecmp_ssse3, %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features - jz 2f - testl $bit_Slow_SSE4_2, FEATURE_OFFSET+index_Slow_SSE4_2+__cpu_features - jnz 2f - leal __strcasecmp_sse4_2, %eax + LOAD_FUNC_GOT_EAX (__strcasecmp_sse4_2) 2: ret END(__strcasecmp) -#endif weak_alias (__strcasecmp, strcasecmp) diff --git a/sysdeps/i386/i686/multiarch/strcasestr-c.c b/sysdeps/i386/i686/multiarch/strcasestr-c.c deleted file mode 100644 index c1d6dac1dd..0000000000 --- a/sysdeps/i386/i686/multiarch/strcasestr-c.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Multiple versions of strcasestr - All versions must be listed in ifunc-impl-list.c. */ -#define __strcasestr_sse2 __strcasestr_ia32 -#include <sysdeps/x86_64/multiarch/strcasestr-c.c> diff --git a/sysdeps/i386/i686/multiarch/strcat-sse2.S b/sysdeps/i386/i686/multiarch/strcat-sse2.S index 0f9e13c6d3..924d1663c6 100644 --- a/sysdeps/i386/i686/multiarch/strcat-sse2.S +++ b/sysdeps/i386/i686/multiarch/strcat-sse2.S @@ -1,5 +1,5 @@ /* strcat with SSE2 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strcat-ssse3.S b/sysdeps/i386/i686/multiarch/strcat-ssse3.S index a5b0bc6818..ab2f8842a0 100644 --- a/sysdeps/i386/i686/multiarch/strcat-ssse3.S +++ b/sysdeps/i386/i686/multiarch/strcat-ssse3.S @@ -1,5 +1,5 @@ /* strcat with SSSE3 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strcat.S b/sysdeps/i386/i686/multiarch/strcat.S index 474f753f3f..d8f4132cf3 100644 --- a/sysdeps/i386/i686/multiarch/strcat.S +++ b/sysdeps/i386/i686/multiarch/strcat.S @@ -1,6 +1,6 @@ /* Multiple versions of strcat All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -45,52 +45,22 @@ need strncat before the initialization happened. */ #if IS_IN (libc) -# ifdef SHARED .text ENTRY(STRCAT) .type STRCAT, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal STRCAT_IA32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) - jz 2f - leal STRCAT_SSE2@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) - jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) - jz 2f - leal STRCAT_SSSE3@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(STRCAT) -# else - -ENTRY(STRCAT) - .type STRCAT, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal STRCAT_IA32, %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (STRCAT_IA32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal STRCAT_SSE2, %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features + LOAD_FUNC_GOT_EAX (STRCAT_SSE2) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features + HAS_CPU_FEATURE (SSSE3) jz 2f - leal STRCAT_SSSE3, %eax + LOAD_FUNC_GOT_EAX (STRCAT_SSSE3) 2: ret END(STRCAT) -# endif - # undef ENTRY # define ENTRY(name) \ .type STRCAT_IA32, @function; \ @@ -118,5 +88,5 @@ END(STRCAT) #endif #ifndef USE_AS_STRNCAT -# include "../../i486/strcat.S" +# include "../../strcat.S" #endif diff --git a/sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S index ba2723bb51..1b48f3314d 100644 --- a/sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S +++ b/sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S @@ -1,5 +1,5 @@ /* strchr with SSE2 with bsf - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strchr-sse2.S b/sysdeps/i386/i686/multiarch/strchr-sse2.S index 4f387eaeea..b6680d1e7a 100644 --- a/sysdeps/i386/i686/multiarch/strchr-sse2.S +++ b/sysdeps/i386/i686/multiarch/strchr-sse2.S @@ -1,5 +1,5 @@ /* strchr SSE2 without bsf - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strchr.S b/sysdeps/i386/i686/multiarch/strchr.S index 45624fdee0..18ea87209f 100644 --- a/sysdeps/i386/i686/multiarch/strchr.S +++ b/sysdeps/i386/i686/multiarch/strchr.S @@ -1,6 +1,6 @@ /* Multiple versions of strchr All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -25,24 +25,15 @@ .text ENTRY(strchr) .type strchr, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __strchr_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__strchr_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __strchr_sse2_bsf@GOTOFF(%ebx), %eax - testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__strchr_sse2_bsf) + HAS_ARCH_FEATURE (Slow_BSF) jz 2f - leal __strchr_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__strchr_sse2) +2: ret END(strchr) # undef ENTRY diff --git a/sysdeps/i386/i686/multiarch/strcmp-sse4.S b/sysdeps/i386/i686/multiarch/strcmp-sse4.S index 38c2317c26..89efb38a40 100644 --- a/sysdeps/i386/i686/multiarch/strcmp-sse4.S +++ b/sysdeps/i386/i686/multiarch/strcmp-sse4.S @@ -1,5 +1,5 @@ /* strcmp with SSE4.2 - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S index fb21288c7d..777f0b7edc 100644 --- a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S +++ b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S @@ -1,5 +1,5 @@ /* strcmp with SSSE3 - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strcmp.S b/sysdeps/i386/i686/multiarch/strcmp.S index 9df40089a7..41d539ecb9 100644 --- a/sysdeps/i386/i686/multiarch/strcmp.S +++ b/sysdeps/i386/i686/multiarch/strcmp.S @@ -1,6 +1,6 @@ /* Multiple versions of strcmp All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -51,50 +51,21 @@ define multiple versions for strncmp in static library since we need strncmp before the initialization happened. */ #if (defined SHARED || !defined USE_AS_STRNCMP) && IS_IN (libc) -# ifdef SHARED .text ENTRY(STRCMP) .type STRCMP, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __STRCMP_IA32@GOTOFF(%ebx), %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__STRCMP_IA32) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __STRCMP_SSSE3@GOTOFF(%ebx), %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__STRCMP_SSSE3) + HAS_CPU_FEATURE (SSE4_2) jz 2f - testl $bit_Slow_SSE4_2, FEATURE_OFFSET+index_Slow_SSE4_2+__cpu_features@GOTOFF(%ebx) + HAS_ARCH_FEATURE (Slow_SSE4_2) jnz 2f - leal __STRCMP_SSE4_2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(STRCMP) -# else - .text -ENTRY(STRCMP) - .type STRCMP, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __STRCMP_IA32, %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features - jz 2f - leal __STRCMP_SSSE3, %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features - jz 2f - testl $bit_Slow_SSE4_2, FEATURE_OFFSET+index_Slow_SSE4_2+__cpu_features - jnz 2f - leal __STRCMP_SSE4_2, %eax + LOAD_FUNC_GOT_EAX (__STRCMP_SSE4_2) 2: ret END(STRCMP) -# endif # undef ENTRY # define ENTRY(name) \ diff --git a/sysdeps/i386/i686/multiarch/strcpy-sse2.S b/sysdeps/i386/i686/multiarch/strcpy-sse2.S index a37c44530d..3baa559e01 100644 --- a/sysdeps/i386/i686/multiarch/strcpy-sse2.S +++ b/sysdeps/i386/i686/multiarch/strcpy-sse2.S @@ -1,5 +1,5 @@ /* strcpy with SSE2 and unaligned load - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strcpy-ssse3.S b/sysdeps/i386/i686/multiarch/strcpy-ssse3.S index 9f88e7735d..10fda83e7b 100644 --- a/sysdeps/i386/i686/multiarch/strcpy-ssse3.S +++ b/sysdeps/i386/i686/multiarch/strcpy-ssse3.S @@ -1,5 +1,5 @@ /* strcpy with SSSE3 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strcpy.S b/sysdeps/i386/i686/multiarch/strcpy.S index c279d468cb..51525bc091 100644 --- a/sysdeps/i386/i686/multiarch/strcpy.S +++ b/sysdeps/i386/i686/multiarch/strcpy.S @@ -1,6 +1,6 @@ /* Multiple versions of strcpy All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -61,52 +61,22 @@ need strncpy before the initialization happened. */ #if IS_IN (libc) -# ifdef SHARED .text ENTRY(STRCPY) .type STRCPY, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal STRCPY_IA32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (STRCPY_IA32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal STRCPY_SSE2@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (STRCPY_SSE2) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal STRCPY_SSSE3@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(STRCPY) -# else - -ENTRY(STRCPY) - .type STRCPY, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal STRCPY_IA32, %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features - jz 2f - leal STRCPY_SSE2, %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features - jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features - jz 2f - leal STRCPY_SSSE3, %eax + LOAD_FUNC_GOT_EAX (STRCPY_SSSE3) 2: ret END(STRCPY) -# endif - # undef ENTRY # define ENTRY(name) \ .type STRCPY_IA32, @function; \ diff --git a/sysdeps/i386/i686/multiarch/strcspn.S b/sysdeps/i386/i686/multiarch/strcspn.S index e6ea454150..4a7b177727 100644 --- a/sysdeps/i386/i686/multiarch/strcspn.S +++ b/sysdeps/i386/i686/multiarch/strcspn.S @@ -1,6 +1,6 @@ /* Multiple versions of strcspn All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -19,9 +19,6 @@ <http://www.gnu.org/licenses/>. */ #include <config.h> - -#ifdef HAVE_SSE4_SUPPORT - #include <sysdep.h> #include <init-arch.h> @@ -42,40 +39,16 @@ define multiple versions for strpbrk in static library since we need strpbrk before the initialization happened. */ #if (defined SHARED || !defined USE_AS_STRPBRK) && IS_IN (libc) -# ifdef SHARED - .text -ENTRY(STRCSPN) - .type STRCSPN, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal STRCSPN_IA32@GOTOFF(%ebx), %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) - jz 2f - leal STRCSPN_SSE42@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret -END(STRCSPN) -# else .text ENTRY(STRCSPN) .type STRCSPN, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal STRCSPN_IA32, %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (STRCSPN_IA32) + HAS_CPU_FEATURE (SSE4_2) jz 2f - leal STRCSPN_SSE42, %eax + LOAD_FUNC_GOT_EAX (STRCSPN_SSE42) 2: ret END(STRCSPN) -# endif # undef ENTRY # define ENTRY(name) \ @@ -95,8 +68,6 @@ END(STRCSPN) .globl __GI_STRCSPN; __GI_STRCSPN = STRCSPN_IA32 #endif -#endif /* HAVE_SSE4_SUPPORT */ - #ifdef USE_AS_STRPBRK #include "../../strpbrk.S" #else diff --git a/sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S b/sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S index 668a2a65fc..e4a82495ec 100644 --- a/sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S +++ b/sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S @@ -1,5 +1,5 @@ /* strlen with SSE2 and BSF - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strlen-sse2.S b/sysdeps/i386/i686/multiarch/strlen-sse2.S index 3d30714b7a..f7724f8a51 100644 --- a/sysdeps/i386/i686/multiarch/strlen-sse2.S +++ b/sysdeps/i386/i686/multiarch/strlen-sse2.S @@ -1,5 +1,5 @@ /* strlen with SSE2 - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strlen.S b/sysdeps/i386/i686/multiarch/strlen.S index 2e6993b738..0218947c49 100644 --- a/sysdeps/i386/i686/multiarch/strlen.S +++ b/sysdeps/i386/i686/multiarch/strlen.S @@ -1,6 +1,6 @@ /* Multiple versions of strlen All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -28,24 +28,15 @@ .text ENTRY(strlen) .type strlen, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __strlen_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__strlen_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __strlen_sse2_bsf@GOTOFF(%ebx), %eax - testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__strlen_sse2_bsf) + HAS_ARCH_FEATURE (Slow_BSF) jz 2f - leal __strlen_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__strlen_sse2) +2: ret END(strlen) # undef ENTRY diff --git a/sysdeps/i386/i686/multiarch/strncase.S b/sysdeps/i386/i686/multiarch/strncase.S index c2cb03c2bb..52d4ba5a2a 100644 --- a/sysdeps/i386/i686/multiarch/strncase.S +++ b/sysdeps/i386/i686/multiarch/strncase.S @@ -1,6 +1,6 @@ /* Entry point for multi-version x86 strncasecmp. All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,49 +20,20 @@ #include <sysdep.h> #include <init-arch.h> -#ifdef SHARED .text ENTRY(__strncasecmp) .type __strncasecmp, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __strncasecmp_ia32@GOTOFF(%ebx), %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__strncasecmp_ia32) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __strncasecmp_ssse3@GOTOFF(%ebx), %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__strncasecmp_ssse3) + HAS_CPU_FEATURE (SSE4_2) jz 2f - testl $bit_Slow_SSE4_2, FEATURE_OFFSET+index_Slow_SSE4_2+__cpu_features@GOTOFF(%ebx) + HAS_ARCH_FEATURE (Slow_SSE4_2) jnz 2f - leal __strncasecmp_sse4_2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(__strncasecmp) -#else - .text -ENTRY(__strncasecmp) - .type __strncasecmp, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __strncasecmp_ia32, %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features - jz 2f - leal __strncasecmp_ssse3, %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features - jz 2f - testl $bit_Slow_SSE4_2, FEATURE_OFFSET+index_Slow_SSE4_2+__cpu_features - jnz 2f - leal __strncasecmp_sse4_2, %eax + LOAD_FUNC_GOT_EAX (__strncasecmp_sse4_2) 2: ret END(__strncasecmp) -#endif weak_alias (__strncasecmp, strncasecmp) diff --git a/sysdeps/i386/i686/multiarch/strnlen.S b/sysdeps/i386/i686/multiarch/strnlen.S index 56a5136606..e77562d2cf 100644 --- a/sysdeps/i386/i686/multiarch/strnlen.S +++ b/sysdeps/i386/i686/multiarch/strnlen.S @@ -1,6 +1,6 @@ /* Multiple versions of strnlen All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -25,21 +25,12 @@ .text ENTRY(__strnlen) .type __strnlen, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __strnlen_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__strnlen_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __strnlen_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__strnlen_sse2) +2: ret END(__strnlen) weak_alias(__strnlen, strnlen) diff --git a/sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S index a3d42ddd4f..e2713ca3fe 100644 --- a/sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S +++ b/sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S @@ -1,5 +1,5 @@ /* strrchr with SSE2 with bsf and bsr - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strrchr-sse2.S b/sysdeps/i386/i686/multiarch/strrchr-sse2.S index df36ba0a93..a0c536a5e2 100644 --- a/sysdeps/i386/i686/multiarch/strrchr-sse2.S +++ b/sysdeps/i386/i686/multiarch/strrchr-sse2.S @@ -1,5 +1,5 @@ /* strrchr SSE2 without bsf and bsr - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strrchr.S b/sysdeps/i386/i686/multiarch/strrchr.S index 91074b4315..39305760e9 100644 --- a/sysdeps/i386/i686/multiarch/strrchr.S +++ b/sysdeps/i386/i686/multiarch/strrchr.S @@ -1,6 +1,6 @@ /* Multiple versions of strrchr All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -25,24 +25,15 @@ .text ENTRY(strrchr) .type strrchr, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __strrchr_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__strrchr_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __strrchr_sse2_bsf@GOTOFF(%ebx), %eax - testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__strrchr_sse2_bsf) + HAS_ARCH_FEATURE (Slow_BSF) jz 2f - leal __strrchr_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__strrchr_sse2) +2: ret END(strrchr) # undef ENTRY diff --git a/sysdeps/i386/i686/multiarch/strspn.S b/sysdeps/i386/i686/multiarch/strspn.S index 9d353a2735..6ed4861efe 100644 --- a/sysdeps/i386/i686/multiarch/strspn.S +++ b/sysdeps/i386/i686/multiarch/strspn.S @@ -1,6 +1,6 @@ /* Multiple versions of strspn All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -19,48 +19,21 @@ <http://www.gnu.org/licenses/>. */ #include <config.h> - -#ifdef HAVE_SSE4_SUPPORT - #include <sysdep.h> #include <init-arch.h> /* Define multiple versions only for the definition in libc. */ #if IS_IN (libc) -# ifdef SHARED - .text -ENTRY(strspn) - .type strspn, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __strspn_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) - jz 2f - leal __strspn_sse42@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret -END(strspn) -# else .text ENTRY(strspn) .type strspn, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __strspn_ia32, %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__strspn_ia32) + HAS_CPU_FEATURE (SSE4_2) jz 2f - leal __strspn_sse42, %eax + LOAD_FUNC_GOT_EAX (__strspn_sse42) 2: ret END(strspn) -# endif # undef ENTRY # define ENTRY(name) \ @@ -80,6 +53,4 @@ __strspn_ia32: cfi_startproc; \ .globl __GI_strspn; __GI_strspn = __strspn_ia32 #endif -#endif /* HAVE_SSE4_SUPPORT */ - #include "../../strspn.S" diff --git a/sysdeps/i386/i686/multiarch/wcschr-sse2.S b/sysdeps/i386/i686/multiarch/wcschr-sse2.S index 818eaa3014..4bcc553569 100644 --- a/sysdeps/i386/i686/multiarch/wcschr-sse2.S +++ b/sysdeps/i386/i686/multiarch/wcschr-sse2.S @@ -1,5 +1,5 @@ /* wcschr with SSE2, without using bsf instructions - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/wcschr.S b/sysdeps/i386/i686/multiarch/wcschr.S index 603d7d79c1..b7f50e46ea 100644 --- a/sysdeps/i386/i686/multiarch/wcschr.S +++ b/sysdeps/i386/i686/multiarch/wcschr.S @@ -1,6 +1,6 @@ /* Multiple versions of wcschr All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -25,21 +25,12 @@ .text ENTRY(__wcschr) .type wcschr, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __wcschr_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__wcschr_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __wcschr_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__wcschr_sse2) +2: ret END(__wcschr) weak_alias (__wcschr, wcschr) #endif diff --git a/sysdeps/i386/i686/multiarch/wcscmp-sse2.S b/sysdeps/i386/i686/multiarch/wcscmp-sse2.S index b25103df2d..ff57063b9b 100644 --- a/sysdeps/i386/i686/multiarch/wcscmp-sse2.S +++ b/sysdeps/i386/i686/multiarch/wcscmp-sse2.S @@ -1,5 +1,5 @@ /* wcscmp with SSE2 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/wcscmp.S b/sysdeps/i386/i686/multiarch/wcscmp.S index 92c2c84ad4..c7d7d51bdd 100644 --- a/sysdeps/i386/i686/multiarch/wcscmp.S +++ b/sysdeps/i386/i686/multiarch/wcscmp.S @@ -1,6 +1,6 @@ /* Multiple versions of wcscmp All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -28,21 +28,12 @@ .text ENTRY(__wcscmp) .type __wcscmp, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __wcscmp_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__wcscmp_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __wcscmp_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__wcscmp_sse2) +2: ret END(__wcscmp) weak_alias (__wcscmp, wcscmp) #endif diff --git a/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S b/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S index 8828f6eff1..09e538369f 100644 --- a/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S +++ b/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S @@ -1,5 +1,5 @@ /* wcscpy with SSSE3 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/wcscpy.S b/sysdeps/i386/i686/multiarch/wcscpy.S index f7253c7f45..345511530c 100644 --- a/sysdeps/i386/i686/multiarch/wcscpy.S +++ b/sysdeps/i386/i686/multiarch/wcscpy.S @@ -1,6 +1,6 @@ /* Multiple versions of wcscpy All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -26,20 +26,11 @@ .text ENTRY(wcscpy) .type wcscpy, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __wcscpy_ia32@GOTOFF(%ebx), %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__wcscpy_ia32) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __wcscpy_ssse3@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__wcscpy_ssse3) +2: ret END(wcscpy) #endif diff --git a/sysdeps/i386/i686/multiarch/wcslen-sse2.S b/sysdeps/i386/i686/multiarch/wcslen-sse2.S index 1c54b1894c..897debb122 100644 --- a/sysdeps/i386/i686/multiarch/wcslen-sse2.S +++ b/sysdeps/i386/i686/multiarch/wcslen-sse2.S @@ -1,5 +1,5 @@ /* wcslen with SSE2 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/wcslen.S b/sysdeps/i386/i686/multiarch/wcslen.S index 3926a50a87..42e0c6b2c0 100644 --- a/sysdeps/i386/i686/multiarch/wcslen.S +++ b/sysdeps/i386/i686/multiarch/wcslen.S @@ -1,6 +1,6 @@ /* Multiple versions of wcslen All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -25,21 +25,12 @@ .text ENTRY(__wcslen) .type __wcslen, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __wcslen_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__wcslen_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __wcslen_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__wcslen_sse2) +2: ret END(__wcslen) weak_alias(__wcslen, wcslen) diff --git a/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S b/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S index f897618a3a..e68004204a 100644 --- a/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S +++ b/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S @@ -1,5 +1,5 @@ /* wcsrchr with SSE2, without using bsf instructions. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/wcsrchr.S b/sysdeps/i386/i686/multiarch/wcsrchr.S index 5c96129fbe..5c9d8f7b5d 100644 --- a/sysdeps/i386/i686/multiarch/wcsrchr.S +++ b/sysdeps/i386/i686/multiarch/wcsrchr.S @@ -1,6 +1,6 @@ /* Multiple versions of wcsrchr All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -25,20 +25,11 @@ .text ENTRY(wcsrchr) .type wcsrchr, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __wcsrchr_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__wcsrchr_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __wcsrchr_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__wcsrchr_sse2) +2: ret END(wcsrchr) #endif diff --git a/sysdeps/i386/i686/multiarch/wmemcmp.S b/sysdeps/i386/i686/multiarch/wmemcmp.S index 6ca60531db..ada6c693cb 100644 --- a/sysdeps/i386/i686/multiarch/wmemcmp.S +++ b/sysdeps/i386/i686/multiarch/wmemcmp.S @@ -1,6 +1,6 @@ /* Multiple versions of wmemcmp All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -27,23 +27,14 @@ .text ENTRY(wmemcmp) .type wmemcmp, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __wmemcmp_ia32@GOTOFF(%ebx), %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__wmemcmp_ia32) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __wmemcmp_ssse3@GOTOFF(%ebx), %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__wmemcmp_ssse3) + HAS_CPU_FEATURE (SSE4_2) jz 2f - leal __wmemcmp_sse4_2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__wmemcmp_sse4_2) +2: ret END(wmemcmp) #endif |