diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2013-01-10 15:48:23 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2013-01-10 15:48:23 -0800 |
commit | ae5b491bc523ad440184c4ba6bcfa15b35fe11c8 (patch) | |
tree | a8a3a610f7dbb8eb1e5aa7b3ecffd2d974e7a068 | |
parent | 5aff58049a0421cc531cfb3c452463d34528fe01 (diff) |
Rename xxx_ia32/xxx_sse2 to xxx_generichjl/x86
25 files changed, 202 insertions, 178 deletions
diff --git a/ChangeLog.x86 b/ChangeLog.x86 index 1dcf0cbb2b..5458d2e246 100644 --- a/ChangeLog.x86 +++ b/ChangeLog.x86 @@ -1,3 +1,75 @@ +2013-01-04 H.J. Lu <hongjiu.lu@intel.com> + + * sysdeps/i386/i686/multiarch/ifunc-impl-list.c + (__libc_ifunc_impl_list): Replace __stpncpy_ia32, __stpcpy_ia32, + __strcasestr_ia32, __strcat_ia32, __strcpy_ia32, __strcspn_ia32, + __strncat_ia32, __strncpy_ia32, __strpbrk_ia32, __strspn_ia32, + __strstr_ia32, __wcscpy_ia32 and __wmemcmp_ia32 with + __stpncpy_generic, __stpcpy_generic, __strcasestr_generic, + __strcpy_generic, __strcspn_generic, __strncat_generic, + __strncpy_generic, __strpbrk_generic, __strspn_generic, + __strstr_generic, __wcscpy_generic and __wmemcmp_generic, + respectively. + * sysdeps/i386/i686/multiarch/strcat.S (STRCAT_IA32): Renamed + to ... + (STRCAT_GENERIC): This. + * sysdeps/i386/i686/multiarch/strcpy.S (STRCPY_IA32): Renamed + to ... + (STRCPY_GENERIC): This. + * sysdeps/i386/i686/multiarch/strcspn.S (STRCSPN_IA32): Renamed + to ... + (STRCSPN_GENERIC): This. + * sysdeps/i386/i686/multiarch/strspn.S: Replace __strspn_ia32 + with __strspn_generic. + * sysdeps/i386/i686/multiarch/wcscpy.S: Replace __wcscpy_ia32 + with __wcscpy_generic. + * sysdeps/i386/i686/multiarch/wmemcmp.S: Replace __wmemcmp_ia32 + with __wmemcmp_generic. + * sysdeps/x86/i686/multiarch/strcasestr-c.c: Replace + __strcasestr_sse2 with __strcasestr_generic. + * sysdeps/x86/i686/multiarch/strcspn-c.c: Replace __strcspn_sse2 + with __strcspn_generic. + * sysdeps/x86/i686/multiarch/strncat-c.c: Replace __strncat_sse2 + with __strncat_generic. + * sysdeps/x86/i686/multiarch/strncpy-c.c: Replace __strncpy_sse2 + with __strncpy_generic. + * sysdeps/x86/i686/multiarch/strpbrk-c.c: Replace __strpbrk_sse2 + with __strpbrk_generic. + * sysdeps/x86/i686/multiarch/strspn-c.c: Replace __strspn_sse2 + with __strspn_generic. + * sysdeps/x86/i686/multiarch/strstr-c.c: Replace __strstr_sse2 + with __strstr_generic. + * sysdeps/x86/i686/multiarch/wcscpy-c.c: Replace __wcscpy_sse2 + with __wcscpy_generic. + * sysdeps/x86/i686/multiarch/wmemcmp-c.c: Replace __wmemcmp_sse2 + with __wmemcmp_generic. + * sysdeps/x86_64/multiarch/ifunc-impl-list.c: Replace + __stpncpy_sse2, __stpcpy_sse2, __strcasestr_sse2, __strcat_sse2, + __strcpy_sse2, __strcspn_sse2, __strncat_sse2, __strncpy_sse2, + __strpbrk_sse2, __strspn_sse2, __strstr_sse2, __wcscpy_sse2 and + __wmemcmp_sse2 with __stpncpy_generic, __stpcpy_generic, + __strcasestr_generic, __strcat_generic, __strcpy_generic, + __strcspn_generic, __strncat_generic, __strncpy_generic, + __strpbrk_generic, __strspn_generic, __strstr_generic, + __wcscpy_generic and __wmemcmp_generic, respectively. + * sysdeps/x86_64/multiarch/stpncpy-c.c: Replace __stpncpy_sse2 + with __stpncpy_generic. + * sysdeps/x86_64/multiarch/strcat.S (STRCAT_SSE2): Renamed to + ... + (STRCAT_GENERIC): This. + * sysdeps/x86_64/multiarch/strcpy.S (STRCPY_SSE2): Renamed to + ... + (STRCPY_GENRIC): This. + * sysdeps/x86_64/multiarch/strcspn.S (STRCSPN_SSE2): Renamed to + ... + (STRCSPN_GENERIC): This. + * sysdeps/x86_64/multiarch/strspn.S: Replace __strspn_sse2 + with __strspn_generic. + * sysdeps/x86_64/multiarch/wcscpy.S: Replace __wcscpy_sse2 + with __wcscpy_generic. + * sysdeps/x86_64/multiarch/wmemcmp.S: Replace __wmemcmp_sse2 + with __wmemcmp_generic. + 2012-12-14 H.J. Lu <hongjiu.lu@intel.com> * sysdeps/i386/i686/multiarch/Makefile (aux): Don't add init-arch. diff --git a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c index 2c282bdb72..24291c08be 100644 --- a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c +++ b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c @@ -116,13 +116,13 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL_ADD (array, i, stpncpy, HAS_SSSE3, __stpncpy_ssse3) IFUNC_IMPL_ADD (array, i, stpncpy, HAS_SSE2, __stpncpy_sse2) - IFUNC_IMPL_ADD (array, i, stpncpy, 1, __stpncpy_ia32)) + IFUNC_IMPL_ADD (array, i, stpncpy, 1, __stpncpy_generic)) /* 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, 1, __stpcpy_ia32)) + IFUNC_IMPL_ADD (array, i, stpcpy, 1, __stpcpy_generic)) /* Support sysdeps/i386/i686/multiarch/strcasecmp.S. */ IFUNC_IMPL (i, name, strcasecmp, @@ -145,13 +145,13 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL (i, name, strcasestr, IFUNC_IMPL_ADD (array, i, strcasestr, HAS_SSE4_2, __strcasestr_sse42) - IFUNC_IMPL_ADD (array, i, strcasestr, 1, __strcasestr_ia32)) + IFUNC_IMPL_ADD (array, i, strcasestr, 1, __strcasestr_generic)) /* 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, 1, __strcat_ia32)) + IFUNC_IMPL_ADD (array, i, strcat, 1, __strcat_generic)) /* Support sysdeps/i386/i686/multiarch/strchr.S. */ IFUNC_IMPL (i, name, strchr, @@ -171,13 +171,13 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, 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, 1, __strcpy_ia32)) + IFUNC_IMPL_ADD (array, i, strcpy, 1, __strcpy_generic)) /* Support sysdeps/i386/i686/multiarch/strcspn.S. */ IFUNC_IMPL (i, name, strcspn, IFUNC_IMPL_ADD (array, i, strcspn, HAS_SSE4_2, __strcspn_sse42) - IFUNC_IMPL_ADD (array, i, strcspn, 1, __strcspn_ia32)) + IFUNC_IMPL_ADD (array, i, strcspn, 1, __strcspn_generic)) /* Support sysdeps/i386/i686/multiarch/strncase.S. */ IFUNC_IMPL (i, name, strncasecmp, @@ -202,14 +202,14 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL_ADD (array, i, strncat, HAS_SSSE3, __strncat_ssse3) IFUNC_IMPL_ADD (array, i, strncat, HAS_SSE2, __strncat_sse2) - IFUNC_IMPL_ADD (array, i, strncat, 1, __strncat_ia32)) + IFUNC_IMPL_ADD (array, i, strncat, 1, __strncat_generic)) /* Support sysdeps/i386/i686/multiarch/strncpy.S. */ IFUNC_IMPL (i, name, strncpy, IFUNC_IMPL_ADD (array, i, strncpy, HAS_SSSE3, __strncpy_ssse3) IFUNC_IMPL_ADD (array, i, strncpy, HAS_SSE2, __strncpy_sse2) - IFUNC_IMPL_ADD (array, i, strncpy, 1, __strncpy_ia32)) + IFUNC_IMPL_ADD (array, i, strncpy, 1, __strncpy_generic)) /* Support sysdeps/i386/i686/multiarch/strnlen.S. */ IFUNC_IMPL (i, name, strnlen, @@ -220,7 +220,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL (i, name, strpbrk, IFUNC_IMPL_ADD (array, i, strpbrk, HAS_SSE4_2, __strpbrk_sse42) - IFUNC_IMPL_ADD (array, i, strpbrk, 1, __strpbrk_ia32)) + IFUNC_IMPL_ADD (array, i, strpbrk, 1, __strpbrk_generic)) /* Support sysdeps/i386/i686/multiarch/strrchr.S. */ IFUNC_IMPL (i, name, strrchr, @@ -232,12 +232,12 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, /* 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, 1, __strspn_ia32)) + IFUNC_IMPL_ADD (array, i, strspn, 1, __strspn_generic)) /* Support sysdeps/i386/i686/multiarch/strstr-c.c. */ IFUNC_IMPL (i, name, strstr, IFUNC_IMPL_ADD (array, i, strstr, HAS_SSE4_2, __strstr_sse42) - IFUNC_IMPL_ADD (array, i, strstr, 1, __strstr_ia32)) + IFUNC_IMPL_ADD (array, i, strstr, 1, __strstr_generic)) /* Support sysdeps/i386/i686/multiarch/wcschr.S. */ IFUNC_IMPL (i, name, wcschr, @@ -252,7 +252,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, /* 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, 1, __wcscpy_ia32)) + IFUNC_IMPL_ADD (array, i, wcscpy, 1, __wcscpy_generic)) /* Support sysdeps/i386/i686/multiarch/wcslen.S. */ IFUNC_IMPL (i, name, wcslen, @@ -270,7 +270,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, __wmemcmp_sse4_2) IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_SSSE3, __wmemcmp_ssse3) - IFUNC_IMPL_ADD (array, i, wmemcmp, 1, __wmemcmp_ia32)) + IFUNC_IMPL_ADD (array, i, wmemcmp, 1, __wmemcmp_generic)) #ifdef SHARED /* Support sysdeps/i386/i686/multiarch/memcpy_chk.S. */ diff --git a/sysdeps/i386/i686/multiarch/strcat.S b/sysdeps/i386/i686/multiarch/strcat.S index e79c1b9815..7ea055a5ab 100644 --- a/sysdeps/i386/i686/multiarch/strcat.S +++ b/sysdeps/i386/i686/multiarch/strcat.S @@ -30,12 +30,12 @@ #ifdef USE_AS_STRNCAT # define STRCAT_SSSE3 __strncat_ssse3 # define STRCAT_SSE2 __strncat_sse2 -# define STRCAT_IA32 __strncat_ia32 +# define STRCAT_GENERIC __strncat_generic # define __GI_STRCAT __GI_strncat #else # define STRCAT_SSSE3 __strcat_ssse3 # define STRCAT_SSE2 __strcat_sse2 -# define STRCAT_IA32 __strcat_ia32 +# define STRCAT_GENERIC __strcat_generic # define __GI_STRCAT __GI_strcat #endif @@ -56,7 +56,7 @@ ENTRY(STRCAT) cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) jne 1f call __init_cpu_features -1: leal STRCAT_IA32@GOTOFF(%ebx), %eax +1: leal STRCAT_GENERIC@GOTOFF(%ebx), %eax testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) jz 2f leal STRCAT_SSE2@GOTOFF(%ebx), %eax @@ -77,7 +77,7 @@ ENTRY(STRCAT) cmpl $0, KIND_OFFSET+__cpu_features jne 1f call __init_cpu_features -1: leal STRCAT_IA32, %eax +1: leal STRCAT_GENERIC, %eax testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features jz 2f leal STRCAT_SSE2, %eax @@ -93,15 +93,15 @@ END(STRCAT) # undef ENTRY # define ENTRY(name) \ - .type STRCAT_IA32, @function; \ + .type STRCAT_GENERIC, @function; \ .align 16; \ - .globl STRCAT_IA32; \ - .hidden STRCAT_IA32; \ - STRCAT_IA32: cfi_startproc; \ + .globl STRCAT_GENERIC; \ + .hidden STRCAT_GENERIC; \ + STRCAT_GENERIC: cfi_startproc; \ CALL_MCOUNT # undef END # define END(name) \ - cfi_endproc; .size STRCAT_IA32, .-STRCAT_IA32 + cfi_endproc; .size STRCAT_GENERIC, .-STRCAT_GENERIC # ifdef SHARED # undef libc_hidden_builtin_def @@ -109,10 +109,10 @@ END(STRCAT) The speedup we get from using SSSE3 instruction is likely eaten away by the indirect call in the PLT. */ # define libc_hidden_builtin_def(name) \ - .globl __GI_STRCAT; __GI_STRCAT = STRCAT_IA32 + .globl __GI_STRCAT; __GI_STRCAT = STRCAT_GENERIC # undef libc_hidden_def # define libc_hidden_def(name) \ - .globl __GI___STRCAT; __GI___STRCAT = STRCAT_IA32 + .globl __GI___STRCAT; __GI___STRCAT = STRCAT_GENERIC # endif #endif diff --git a/sysdeps/i386/i686/multiarch/strcpy.S b/sysdeps/i386/i686/multiarch/strcpy.S index 946f1d6ff6..d04424bc24 100644 --- a/sysdeps/i386/i686/multiarch/strcpy.S +++ b/sysdeps/i386/i686/multiarch/strcpy.S @@ -31,13 +31,13 @@ # ifdef USE_AS_STRNCPY # define STRCPY_SSSE3 __stpncpy_ssse3 # define STRCPY_SSE2 __stpncpy_sse2 -# define STRCPY_IA32 __stpncpy_ia32 +# define STRCPY_GENERIC __stpncpy_generic # define __GI_STRCPY __GI_stpncpy # define __GI___STRCPY __GI___stpncpy # else # define STRCPY_SSSE3 __stpcpy_ssse3 # define STRCPY_SSE2 __stpcpy_sse2 -# define STRCPY_IA32 __stpcpy_ia32 +# define STRCPY_GENERIC __stpcpy_generic # define __GI_STRCPY __GI_stpcpy # define __GI___STRCPY __GI___stpcpy # endif @@ -45,12 +45,12 @@ # ifdef USE_AS_STRNCPY # define STRCPY_SSSE3 __strncpy_ssse3 # define STRCPY_SSE2 __strncpy_sse2 -# define STRCPY_IA32 __strncpy_ia32 +# define STRCPY_GENERIC __strncpy_generic # define __GI_STRCPY __GI_strncpy # else # define STRCPY_SSSE3 __strcpy_ssse3 # define STRCPY_SSE2 __strcpy_sse2 -# define STRCPY_IA32 __strcpy_ia32 +# define STRCPY_GENERIC __strcpy_generic # define __GI_STRCPY __GI_strcpy # endif #endif @@ -72,7 +72,7 @@ ENTRY(STRCPY) cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) jne 1f call __init_cpu_features -1: leal STRCPY_IA32@GOTOFF(%ebx), %eax +1: leal STRCPY_GENERIC@GOTOFF(%ebx), %eax testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) jz 2f leal STRCPY_SSE2@GOTOFF(%ebx), %eax @@ -93,7 +93,7 @@ ENTRY(STRCPY) cmpl $0, KIND_OFFSET+__cpu_features jne 1f call __init_cpu_features -1: leal STRCPY_IA32, %eax +1: leal STRCPY_GENERIC, %eax testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features jz 2f leal STRCPY_SSE2, %eax @@ -109,15 +109,15 @@ END(STRCPY) # undef ENTRY # define ENTRY(name) \ - .type STRCPY_IA32, @function; \ + .type STRCPY_GENERIC, @function; \ .align 16; \ - .globl STRCPY_IA32; \ - .hidden STRCPY_IA32; \ - STRCPY_IA32: cfi_startproc; \ + .globl STRCPY_GENERIC; \ + .hidden STRCPY_GENERIC; \ + STRCPY_GENERIC: cfi_startproc; \ CALL_MCOUNT # undef END # define END(name) \ - cfi_endproc; .size STRCPY_IA32, .-STRCPY_IA32 + cfi_endproc; .size STRCPY_GENERIC, .-STRCPY_GENERIC # ifdef SHARED # undef libc_hidden_builtin_def @@ -125,10 +125,10 @@ END(STRCPY) The speedup we get from using SSSE3 instruction is likely eaten away by the indirect call in the PLT. */ # define libc_hidden_builtin_def(name) \ - .globl __GI_STRCPY; __GI_STRCPY = STRCPY_IA32 + .globl __GI_STRCPY; __GI_STRCPY = STRCPY_GENERIC # undef libc_hidden_def # define libc_hidden_def(name) \ - .globl __GI___STRCPY; __GI___STRCPY = STRCPY_IA32 + .globl __GI___STRCPY; __GI___STRCPY = STRCPY_GENERIC # endif #endif diff --git a/sysdeps/i386/i686/multiarch/strcspn.S b/sysdeps/i386/i686/multiarch/strcspn.S index c2af6fb912..b40197ed75 100644 --- a/sysdeps/i386/i686/multiarch/strcspn.S +++ b/sysdeps/i386/i686/multiarch/strcspn.S @@ -27,13 +27,13 @@ #ifdef USE_AS_STRPBRK #define STRCSPN_SSE42 __strpbrk_sse42 -#define STRCSPN_IA32 __strpbrk_ia32 +#define STRCSPN_GENERIC __strpbrk_generic #define __GI_STRCSPN __GI_strpbrk #else #ifndef STRCSPN #define STRCSPN strcspn #define STRCSPN_SSE42 __strcspn_sse42 -#define STRCSPN_IA32 __strcspn_ia32 +#define STRCSPN_GENERIC __strcspn_generic #define __GI_STRCSPN __GI_strcspn #endif #endif @@ -53,7 +53,7 @@ ENTRY(STRCSPN) cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) jne 1f call __init_cpu_features -1: leal STRCSPN_IA32@GOTOFF(%ebx), %eax +1: leal STRCSPN_GENERIC@GOTOFF(%ebx), %eax testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) jz 2f leal STRCSPN_SSE42@GOTOFF(%ebx), %eax @@ -69,7 +69,7 @@ ENTRY(STRCSPN) cmpl $0, KIND_OFFSET+__cpu_features jne 1f call __init_cpu_features -1: leal STRCSPN_IA32, %eax +1: leal STRCSPN_GENERIC, %eax testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features jz 2f leal STRCSPN_SSE42, %eax @@ -79,20 +79,20 @@ END(STRCSPN) # undef ENTRY # define ENTRY(name) \ - .type STRCSPN_IA32, @function; \ - .globl STRCSPN_IA32; \ + .type STRCSPN_GENERIC, @function; \ + .globl STRCSPN_GENERIC; \ .p2align 4; \ - STRCSPN_IA32: cfi_startproc; \ + STRCSPN_GENERIC: cfi_startproc; \ CALL_MCOUNT # undef END # define END(name) \ - cfi_endproc; .size STRCSPN_IA32, .-STRCSPN_IA32 + cfi_endproc; .size STRCSPN_GENERIC, .-STRCSPN_GENERIC # undef libc_hidden_builtin_def /* IFUNC doesn't work with the hidden functions in shared library since they will be called without setting up EBX needed for PLT which is used by IFUNC. */ # define libc_hidden_builtin_def(name) \ - .globl __GI_STRCSPN; __GI_STRCSPN = STRCSPN_IA32 + .globl __GI_STRCSPN; __GI_STRCSPN = STRCSPN_GENERIC #endif #endif /* HAVE_SSE4_SUPPORT */ diff --git a/sysdeps/i386/i686/multiarch/strspn.S b/sysdeps/i386/i686/multiarch/strspn.S index 5925137028..2127bfc3c8 100644 --- a/sysdeps/i386/i686/multiarch/strspn.S +++ b/sysdeps/i386/i686/multiarch/strspn.S @@ -38,7 +38,7 @@ ENTRY(strspn) cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) jne 1f call __init_cpu_features -1: leal __strspn_ia32@GOTOFF(%ebx), %eax +1: leal __strspn_generic@GOTOFF(%ebx), %eax testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) jz 2f leal __strspn_sse42@GOTOFF(%ebx), %eax @@ -54,7 +54,7 @@ ENTRY(strspn) cmpl $0, KIND_OFFSET+__cpu_features jne 1f call __init_cpu_features -1: leal __strspn_ia32, %eax +1: leal __strspn_generic, %eax testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features jz 2f leal __strspn_sse42, %eax @@ -64,20 +64,20 @@ END(strspn) # undef ENTRY # define ENTRY(name) \ - .type __strspn_ia32, @function; \ - .globl __strspn_ia32; \ + .type __strspn_generic, @function; \ + .globl __strspn_generic; \ .p2align 4; \ -__strspn_ia32: cfi_startproc; \ +__strspn_generic: cfi_startproc; \ CALL_MCOUNT # undef END # define END(name) \ - cfi_endproc; .size __strspn_ia32, .-__strspn_ia32 + cfi_endproc; .size __strspn_generic, .-__strspn_generic # undef libc_hidden_builtin_def /* IFUNC doesn't work with the hidden functions in shared library since they will be called without setting up EBX needed for PLT which is used by IFUNC. */ # define libc_hidden_builtin_def(name) \ - .globl __GI_strspn; __GI_strspn = __strspn_ia32 + .globl __GI_strspn; __GI_strspn = __strspn_generic #endif #endif /* HAVE_SSE4_SUPPORT */ diff --git a/sysdeps/i386/i686/multiarch/wcscpy.S b/sysdeps/i386/i686/multiarch/wcscpy.S index 9ab4d1bb5a..12e25a383e 100644 --- a/sysdeps/i386/i686/multiarch/wcscpy.S +++ b/sysdeps/i386/i686/multiarch/wcscpy.S @@ -33,7 +33,7 @@ ENTRY(wcscpy) cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) jne 1f call __init_cpu_features -1: leal __wcscpy_ia32@GOTOFF(%ebx), %eax +1: leal __wcscpy_generic@GOTOFF(%ebx), %eax testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) jz 2f leal __wcscpy_ssse3@GOTOFF(%ebx), %eax diff --git a/sysdeps/i386/i686/multiarch/wmemcmp.S b/sysdeps/i386/i686/multiarch/wmemcmp.S index e99403864c..9cec969dc5 100644 --- a/sysdeps/i386/i686/multiarch/wmemcmp.S +++ b/sysdeps/i386/i686/multiarch/wmemcmp.S @@ -34,7 +34,7 @@ ENTRY(wmemcmp) cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) jne 1f call __init_cpu_features -1: leal __wmemcmp_ia32@GOTOFF(%ebx), %eax +1: leal __wmemcmp_generic@GOTOFF(%ebx), %eax testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) jz 2f leal __wmemcmp_ssse3@GOTOFF(%ebx), %eax diff --git a/sysdeps/x86/i686/multiarch/strcasestr-c.c b/sysdeps/x86/i686/multiarch/strcasestr-c.c index 43572f0a5c..1a044cf02c 100644 --- a/sysdeps/x86/i686/multiarch/strcasestr-c.c +++ b/sysdeps/x86/i686/multiarch/strcasestr-c.c @@ -3,16 +3,12 @@ #include "init-arch.h" -#ifndef __x86_64__ -# define __strcasestr_sse2 __strcasestr_ia32 -#endif - -#define STRCASESTR __strcasestr_sse2 +#define STRCASESTR __strcasestr_generic #include "string/strcasestr.c" extern char *__strcasestr_sse42 (const char *, const char *) attribute_hidden; -extern __typeof (__strcasestr_sse2) __strcasestr_sse2 attribute_hidden; +extern __typeof (__strcasestr_generic) __strcasestr_generic attribute_hidden; libc_ifunc (__strcasestr, - HAS_SSE4_2 ? __strcasestr_sse42 : __strcasestr_sse2); + HAS_SSE4_2 ? __strcasestr_sse42 : __strcasestr_generic); diff --git a/sysdeps/x86/i686/multiarch/strcspn-c.c b/sysdeps/x86/i686/multiarch/strcspn-c.c index 6e9053ca59..f7a83f7789 100644 --- a/sysdeps/x86/i686/multiarch/strcspn-c.c +++ b/sysdeps/x86/i686/multiarch/strcspn-c.c @@ -53,12 +53,8 @@ when either CFlag or ZFlag is 1. If CFlag == 1, ECX has the offset X for case 1. */ -#ifndef __x86_64__ -# define __strcspn_sse2 __strcspn_ia32 -#endif - #ifndef STRCSPN_SSE2 -# define STRCSPN_SSE2 __strcspn_sse2 +# define STRCSPN_SSE2 __strcspn_generic # define STRCSPN_SSE42 __strcspn_sse42 #endif diff --git a/sysdeps/x86/i686/multiarch/strncat-c.c b/sysdeps/x86/i686/multiarch/strncat-c.c index 93cd82f608..d98ab00217 100644 --- a/sysdeps/x86/i686/multiarch/strncat-c.c +++ b/sysdeps/x86/i686/multiarch/strncat-c.c @@ -1,17 +1,8 @@ -#ifndef __x86_64__ -# define __strncat_sse2 __strncat_ia32 -#endif - -#define STRNCAT __strncat_sse2 +#define STRNCAT __strncat_generic #ifdef SHARED # undef libc_hidden_def -# ifdef __x86_64__ -# define libc_hidden_def(name) \ - __hidden_ver1 (__strncat_sse2, __GI___strncat, __strncat_sse2); -# else -# define libc_hidden_def(name) \ - __hidden_ver1 (__strncat_ia32, __GI___strncat, __strncat_ia32); -# endif +# define libc_hidden_def(name) \ + __hidden_ver1 (__strncat_generic, __GI___strncat, __strncat_generic); #endif #include "string/strncat.c" diff --git a/sysdeps/x86/i686/multiarch/strncpy-c.c b/sysdeps/x86/i686/multiarch/strncpy-c.c index 9fd3f4cedc..f7a43411c4 100644 --- a/sysdeps/x86/i686/multiarch/strncpy-c.c +++ b/sysdeps/x86/i686/multiarch/strncpy-c.c @@ -1,17 +1,8 @@ -#ifndef __x86_64__ -# define __strncpy_sse2 __strncpy_ia32 -#endif - -#define STRNCPY __strncpy_sse2 +#define STRNCPY __strncpy_generic #ifdef SHARED # undef libc_hidden_builtin_def -# ifdef __x86_64__ -# define libc_hidden_builtin_def(name) \ - __hidden_ver1 (__strncpy_sse2, __GI_strncpy, __strncpy_sse2); -# else -# define libc_hidden_builtin_def(name) \ - __hidden_ver1 (__strncpy_ia32, __GI_strncpy, __strncpy_ia32); -# endif +# define libc_hidden_builtin_def(name) \ + __hidden_ver1 (__strncpy_generic, __GI_strncpy, __strncpy_generic); #endif #include "strncpy.c" diff --git a/sysdeps/x86/i686/multiarch/strpbrk-c.c b/sysdeps/x86/i686/multiarch/strpbrk-c.c index 6b689c034c..17d85c56f2 100644 --- a/sysdeps/x86/i686/multiarch/strpbrk-c.c +++ b/sysdeps/x86/i686/multiarch/strpbrk-c.c @@ -1,11 +1,8 @@ /* Don't define multiple versions for strpbrk in static library since we need strpbrk before the initialization happened. */ #ifdef SHARED -# ifndef __x86_64__ -# define __strpbrk_sse2 __strpbrk_ia32 -# endif # define USE_AS_STRPBRK -# define STRCSPN_SSE2 __strpbrk_sse2 +# define STRCSPN_SSE2 __strpbrk_generic # define STRCSPN_SSE42 __strpbrk_sse42 # include "strcspn-c.c" #endif diff --git a/sysdeps/x86/i686/multiarch/strspn-c.c b/sysdeps/x86/i686/multiarch/strspn-c.c index 2d47380d51..a33b09a7c1 100644 --- a/sysdeps/x86/i686/multiarch/strspn-c.c +++ b/sysdeps/x86/i686/multiarch/strspn-c.c @@ -21,10 +21,6 @@ #include <string.h> #include "varshift.h" -#ifndef __x86_64__ -# define __strspn_sse2 __strspn_ia32 -#endif - /* We use 0x12: _SIDD_SBYTE_OPS | _SIDD_CMP_EQUAL_ANY @@ -56,7 +52,7 @@ We exit from the loop for case 1. */ -extern size_t __strspn_sse2 (const char *, const char *); +extern size_t __strspn_generic (const char *, const char *); size_t @@ -88,7 +84,7 @@ __strspn_sse42 (const char *s, const char *a) /* Don't use SSE4.2 if the length of A > 16. */ if (length > 16) - return __strspn_sse2 (s, a); + return __strspn_generic (s, a); if (index != 0) { @@ -111,7 +107,7 @@ __strspn_sse42 (const char *s, const char *a) /* There is no NULL terminator. Don't use SSE4.2 if the length of A > 16. */ if (a[16] != 0) - return __strspn_sse2 (s, a); + return __strspn_generic (s, a); } } diff --git a/sysdeps/x86/i686/multiarch/strstr-c.c b/sysdeps/x86/i686/multiarch/strstr-c.c index 857ec9c460..a97aea071b 100644 --- a/sysdeps/x86/i686/multiarch/strstr-c.c +++ b/sysdeps/x86/i686/multiarch/strstr-c.c @@ -24,33 +24,24 @@ #include <string.h> #undef strstr -#ifndef __x86_64__ -# define __strstr_sse2 __strstr_ia32 -#endif - -#define STRSTR __strstr_sse2 +#define STRSTR __strstr_generic #ifdef SHARED # undef libc_hidden_builtin_def -# ifdef __x86_64__ -# define libc_hidden_builtin_def(name) \ - __hidden_ver1 (__strstr_sse2, __GI_strstr, __strstr_sse2); -# else -# define libc_hidden_builtin_def(name) \ - __hidden_ver1 (__strstr_ia32, __GI_strstr, __strstr_ia32); -# endif +# define libc_hidden_builtin_def(name) \ + __hidden_ver1 (__strstr_generic, __GI_strstr, __strstr_generic); #endif #include "string/strstr.c" extern __typeof (__redirect_strstr) __strstr_sse42 attribute_hidden; -extern __typeof (__redirect_strstr) __strstr_sse2 attribute_hidden; +extern __typeof (__redirect_strstr) __strstr_generic attribute_hidden; #include "init-arch.h" /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle ifunc symbol properly. */ extern __typeof (__redirect_strstr) __libc_strstr; -libc_ifunc (__libc_strstr, HAS_SSE4_2 ? __strstr_sse42 : __strstr_sse2) +libc_ifunc (__libc_strstr, HAS_SSE4_2 ? __strstr_sse42 : __strstr_generic) #undef strstr strong_alias (__libc_strstr, strstr) diff --git a/sysdeps/x86/i686/multiarch/wcscpy-c.c b/sysdeps/x86/i686/multiarch/wcscpy-c.c index c3801882a2..c92cd6f0d7 100644 --- a/sysdeps/x86/i686/multiarch/wcscpy-c.c +++ b/sysdeps/x86/i686/multiarch/wcscpy-c.c @@ -1,8 +1,5 @@ #ifndef NOT_IN_libc -# ifndef __x86_64__ -# define __wcscpy_sse2 __wcscpy_ia32 -# endif -# define wcscpy __wcscpy_sse2 +# define wcscpy __wcscpy_generic #endif #include "wcsmbs/wcscpy.c" diff --git a/sysdeps/x86/i686/multiarch/wmemcmp-c.c b/sysdeps/x86/i686/multiarch/wmemcmp-c.c index 90e1922490..fb8f918beb 100644 --- a/sysdeps/x86/i686/multiarch/wmemcmp-c.c +++ b/sysdeps/x86/i686/multiarch/wmemcmp-c.c @@ -1,12 +1,9 @@ #ifndef NOT_IN_libc # include <wchar.h> -# ifndef __x86_64__ -# define __wmemcmp_sse2 __wmemcmp_ia32 -# endif -# define WMEMCMP __wmemcmp_sse2 +# define WMEMCMP __wmemcmp_generic -extern __typeof (wmemcmp) __wmemcmp_sse2; +extern __typeof (wmemcmp) __wmemcmp_generic; #endif #include "wcsmbs/wmemcmp.c" diff --git a/sysdeps/x86_64/multiarch/ifunc-impl-list.c b/sysdeps/x86_64/multiarch/ifunc-impl-list.c index 643cb2dd0a..b6660e4d57 100644 --- a/sysdeps/x86_64/multiarch/ifunc-impl-list.c +++ b/sysdeps/x86_64/multiarch/ifunc-impl-list.c @@ -84,13 +84,13 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, __stpncpy_ssse3) IFUNC_IMPL_ADD (array, i, stpncpy, 1, __stpncpy_sse2_unaligned) - IFUNC_IMPL_ADD (array, i, stpncpy, 1, __stpncpy_sse2)) + IFUNC_IMPL_ADD (array, i, stpncpy, 1, __stpncpy_generic)) /* Support sysdeps/x86_64/multiarch/stpcpy.S. */ IFUNC_IMPL (i, name, stpcpy, IFUNC_IMPL_ADD (array, i, stpcpy, HAS_SSSE3, __stpcpy_ssse3) IFUNC_IMPL_ADD (array, i, stpcpy, 1, __stpcpy_sse2_unaligned) - IFUNC_IMPL_ADD (array, i, stpcpy, 1, __stpcpy_sse2)) + IFUNC_IMPL_ADD (array, i, stpcpy, 1, __stpcpy_generic)) /* Support sysdeps/x86_64/multiarch/strcasecmp_l.S. */ IFUNC_IMPL (i, name, strcasecmp, @@ -117,13 +117,13 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL (i, name, strcasestr, IFUNC_IMPL_ADD (array, i, strcasestr, HAS_SSE4_2, __strcasestr_sse42) - IFUNC_IMPL_ADD (array, i, strcasestr, 1, __strcasestr_sse2)) + IFUNC_IMPL_ADD (array, i, strcasestr, 1, __strcasestr_generic)) /* Support sysdeps/x86_64/multiarch/strcat.S. */ IFUNC_IMPL (i, name, strcat, IFUNC_IMPL_ADD (array, i, strcat, HAS_SSSE3, __strcat_ssse3) IFUNC_IMPL_ADD (array, i, strcat, 1, __strcat_sse2_unaligned) - IFUNC_IMPL_ADD (array, i, strcat, 1, __strcat_sse2)) + IFUNC_IMPL_ADD (array, i, strcat, 1, __strcat_generic)) /* Support sysdeps/x86_64/multiarch/strchr.S. */ IFUNC_IMPL (i, name, strchr, @@ -141,13 +141,13 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL (i, name, strcpy, IFUNC_IMPL_ADD (array, i, strcpy, HAS_SSSE3, __strcpy_ssse3) IFUNC_IMPL_ADD (array, i, strcpy, 1, __strcpy_sse2_unaligned) - IFUNC_IMPL_ADD (array, i, strcpy, 1, __strcpy_sse2)) + IFUNC_IMPL_ADD (array, i, strcpy, 1, __strcpy_generic)) /* Support sysdeps/x86_64/multiarch/strcspn.S. */ IFUNC_IMPL (i, name, strcspn, IFUNC_IMPL_ADD (array, i, strcspn, HAS_SSE4_2, __strcspn_sse42) - IFUNC_IMPL_ADD (array, i, strcspn, 1, __strcspn_sse2)) + IFUNC_IMPL_ADD (array, i, strcspn, 1, __strcspn_generic)) /* Support sysdeps/x86_64/multiarch/strncase_l.S. */ IFUNC_IMPL (i, name, strncasecmp, @@ -177,7 +177,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, __strncat_ssse3) IFUNC_IMPL_ADD (array, i, strncat, 1, __strncat_sse2_unaligned) - IFUNC_IMPL_ADD (array, i, strncat, 1, __strncat_sse2)) + IFUNC_IMPL_ADD (array, i, strncat, 1, __strncat_generic)) /* Support sysdeps/x86_64/multiarch/strncpy.S. */ IFUNC_IMPL (i, name, strncpy, @@ -185,7 +185,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, __strncpy_ssse3) IFUNC_IMPL_ADD (array, i, strncpy, 1, __strncpy_sse2_unaligned) - IFUNC_IMPL_ADD (array, i, strncpy, 1, __strncpy_sse2)) + IFUNC_IMPL_ADD (array, i, strncpy, 1, __strncpy_generic)) /* Support sysdeps/x86_64/multiarch/strnlen.S. */ IFUNC_IMPL (i, name, strnlen, @@ -196,7 +196,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL (i, name, strpbrk, IFUNC_IMPL_ADD (array, i, strpbrk, HAS_SSE4_2, __strpbrk_sse42) - IFUNC_IMPL_ADD (array, i, strpbrk, 1, __strpbrk_sse2)) + IFUNC_IMPL_ADD (array, i, strpbrk, 1, __strpbrk_generic)) /* Support sysdeps/x86_64/multiarch/strrchr.S. */ IFUNC_IMPL (i, name, strrchr, @@ -208,17 +208,17 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, /* Support sysdeps/x86_64/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, 1, __strspn_sse2)) + IFUNC_IMPL_ADD (array, i, strspn, 1, __strspn_generic)) /* Support sysdeps/x86_64/multiarch/strstr-c.c. */ IFUNC_IMPL (i, name, strstr, IFUNC_IMPL_ADD (array, i, strstr, HAS_SSE4_2, __strstr_sse42) - IFUNC_IMPL_ADD (array, i, strstr, 1, __strstr_sse2)) + IFUNC_IMPL_ADD (array, i, strstr, 1, __strstr_generic)) /* Support sysdeps/x86_64/multiarch/wcscpy.S. */ IFUNC_IMPL (i, name, wcscpy, IFUNC_IMPL_ADD (array, i, wcscpy, HAS_SSSE3, __wcscpy_ssse3) - IFUNC_IMPL_ADD (array, i, wcscpy, 1, __wcscpy_sse2)) + IFUNC_IMPL_ADD (array, i, wcscpy, 1, __wcscpy_generic)) /* Support sysdeps/x86_64/multiarch/wmemcmp.S. */ IFUNC_IMPL (i, name, wmemcmp, @@ -226,7 +226,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, __wmemcmp_sse4_1) IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_SSSE3, __wmemcmp_ssse3) - IFUNC_IMPL_ADD (array, i, wmemcmp, 1, __wmemcmp_sse2)) + IFUNC_IMPL_ADD (array, i, wmemcmp, 1, __wmemcmp_generic)) #ifdef SHARED /* Support sysdeps/x86_64/multiarch/memcpy_chk.S. */ diff --git a/sysdeps/x86_64/multiarch/stpncpy-c.c b/sysdeps/x86_64/multiarch/stpncpy-c.c index 2fde77dcab..179b896df7 100644 --- a/sysdeps/x86_64/multiarch/stpncpy-c.c +++ b/sysdeps/x86_64/multiarch/stpncpy-c.c @@ -1,8 +1,8 @@ -#define STPNCPY __stpncpy_sse2 +#define STPNCPY __stpncpy_generic #ifdef SHARED #undef libc_hidden_def #define libc_hidden_def(name) \ - __hidden_ver1 (__stpncpy_sse2, __GI___stpncpy, __stpncpy_sse2); + __hidden_ver1 (__stpncpy_generic, __GI___stpncpy, __stpncpy_generic); #endif #include "stpncpy.c" diff --git a/sysdeps/x86_64/multiarch/strcat.S b/sysdeps/x86_64/multiarch/strcat.S index f94dc709be..fc250e4933 100644 --- a/sysdeps/x86_64/multiarch/strcat.S +++ b/sysdeps/x86_64/multiarch/strcat.S @@ -29,13 +29,13 @@ #ifdef USE_AS_STRNCAT # define STRCAT_SSSE3 __strncat_ssse3 -# define STRCAT_SSE2 __strncat_sse2 +# define STRCAT_GENERIC __strncat_generic # define STRCAT_SSE2_UNALIGNED __strncat_sse2_unaligned # define __GI_STRCAT __GI_strncat # define __GI___STRCAT __GI___strncat #else # define STRCAT_SSSE3 __strcat_ssse3 -# define STRCAT_SSE2 __strcat_sse2 +# define STRCAT_GENERIC __strcat_generic # define STRCAT_SSE2_UNALIGNED __strcat_sse2_unaligned # define __GI_STRCAT __GI_strcat # define __GI___STRCAT __GI___strcat @@ -53,7 +53,7 @@ ENTRY(STRCAT) 1: leaq STRCAT_SSE2_UNALIGNED(%rip), %rax testl $bit_Fast_Unaligned_Load, __cpu_features+FEATURE_OFFSET+index_Fast_Unaligned_Load(%rip) jnz 2f - leaq STRCAT_SSE2(%rip), %rax + leaq STRCAT_GENERIC(%rip), %rax testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip) jz 2f leaq STRCAT_SSSE3(%rip), %rax @@ -62,24 +62,24 @@ END(STRCAT) # undef ENTRY # define ENTRY(name) \ - .type STRCAT_SSE2, @function; \ + .type STRCAT_GENERIC, @function; \ .align 16; \ - .globl STRCAT_SSE2; \ - .hidden STRCAT_SSE2; \ - STRCAT_SSE2: cfi_startproc; \ + .globl STRCAT_GENERIC; \ + .hidden STRCAT_GENERIC; \ + STRCAT_GENERIC: cfi_startproc; \ CALL_MCOUNT # undef END # define END(name) \ - cfi_endproc; .size STRCAT_SSE2, .-STRCAT_SSE2 + cfi_endproc; .size STRCAT_GENERIC, .-STRCAT_GENERIC # undef libc_hidden_builtin_def /* It doesn't make sense to send libc-internal strcat calls through a PLT. The speedup we get from using SSSE3 instruction is likely eaten away by the indirect call in the PLT. */ # define libc_hidden_builtin_def(name) \ - .globl __GI_STRCAT; __GI_STRCAT = STRCAT_SSE2 + .globl __GI_STRCAT; __GI_STRCAT = STRCAT_GENERIC # undef libc_hidden_def # define libc_hidden_def(name) \ - .globl __GI___STRCAT; __GI___STRCAT = STRCAT_SSE2 + .globl __GI___STRCAT; __GI___STRCAT = STRCAT_GENERIC #endif #ifndef USE_AS_STRNCAT diff --git a/sysdeps/x86_64/multiarch/strcpy.S b/sysdeps/x86_64/multiarch/strcpy.S index 919a411a9e..7433caf99e 100644 --- a/sysdeps/x86_64/multiarch/strcpy.S +++ b/sysdeps/x86_64/multiarch/strcpy.S @@ -30,13 +30,13 @@ #ifdef USE_AS_STPCPY # ifdef USE_AS_STRNCPY # define STRCPY_SSSE3 __stpncpy_ssse3 -# define STRCPY_SSE2 __stpncpy_sse2 +# define STRCPY_GENRIC __stpncpy_generic # define STRCPY_SSE2_UNALIGNED __stpncpy_sse2_unaligned # define __GI_STRCPY __GI_stpncpy # define __GI___STRCPY __GI___stpncpy # else # define STRCPY_SSSE3 __stpcpy_ssse3 -# define STRCPY_SSE2 __stpcpy_sse2 +# define STRCPY_GENRIC __stpcpy_generic # define STRCPY_SSE2_UNALIGNED __stpcpy_sse2_unaligned # define __GI_STRCPY __GI_stpcpy # define __GI___STRCPY __GI___stpcpy @@ -44,12 +44,12 @@ #else # ifdef USE_AS_STRNCPY # define STRCPY_SSSE3 __strncpy_ssse3 -# define STRCPY_SSE2 __strncpy_sse2 +# define STRCPY_GENRIC __strncpy_generic # define STRCPY_SSE2_UNALIGNED __strncpy_sse2_unaligned # define __GI_STRCPY __GI_strncpy # else # define STRCPY_SSSE3 __strcpy_ssse3 -# define STRCPY_SSE2 __strcpy_sse2 +# define STRCPY_GENRIC __strcpy_generic # define STRCPY_SSE2_UNALIGNED __strcpy_sse2_unaligned # define __GI_STRCPY __GI_strcpy # endif @@ -67,7 +67,7 @@ ENTRY(STRCPY) 1: leaq STRCPY_SSE2_UNALIGNED(%rip), %rax testl $bit_Fast_Unaligned_Load, __cpu_features+FEATURE_OFFSET+index_Fast_Unaligned_Load(%rip) jnz 2f - leaq STRCPY_SSE2(%rip), %rax + leaq STRCPY_GENRIC(%rip), %rax testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip) jz 2f leaq STRCPY_SSSE3(%rip), %rax @@ -76,24 +76,24 @@ END(STRCPY) # undef ENTRY # define ENTRY(name) \ - .type STRCPY_SSE2, @function; \ + .type STRCPY_GENRIC, @function; \ .align 16; \ - .globl STRCPY_SSE2; \ - .hidden STRCPY_SSE2; \ - STRCPY_SSE2: cfi_startproc; \ + .globl STRCPY_GENRIC; \ + .hidden STRCPY_GENRIC; \ + STRCPY_GENRIC: cfi_startproc; \ CALL_MCOUNT # undef END # define END(name) \ - cfi_endproc; .size STRCPY_SSE2, .-STRCPY_SSE2 + cfi_endproc; .size STRCPY_GENRIC, .-STRCPY_GENRIC # undef libc_hidden_builtin_def /* It doesn't make sense to send libc-internal strcpy calls through a PLT. The speedup we get from using SSSE3 instruction is likely eaten away by the indirect call in the PLT. */ # define libc_hidden_builtin_def(name) \ - .globl __GI_STRCPY; __GI_STRCPY = STRCPY_SSE2 + .globl __GI_STRCPY; __GI_STRCPY = STRCPY_GENRIC # undef libc_hidden_def # define libc_hidden_def(name) \ - .globl __GI___STRCPY; __GI___STRCPY = STRCPY_SSE2 + .globl __GI___STRCPY; __GI___STRCPY = STRCPY_GENRIC #endif #ifndef USE_AS_STRNCPY diff --git a/sysdeps/x86_64/multiarch/strcspn.S b/sysdeps/x86_64/multiarch/strcspn.S index df9616510b..a24bff27a8 100644 --- a/sysdeps/x86_64/multiarch/strcspn.S +++ b/sysdeps/x86_64/multiarch/strcspn.S @@ -27,13 +27,13 @@ #ifdef USE_AS_STRPBRK #define STRCSPN_SSE42 __strpbrk_sse42 -#define STRCSPN_SSE2 __strpbrk_sse2 +#define STRCSPN_GENERIC __strpbrk_generic #define __GI_STRCSPN __GI_strpbrk #else #ifndef STRCSPN #define STRCSPN strcspn #define STRCSPN_SSE42 __strcspn_sse42 -#define STRCSPN_SSE2 __strcspn_sse2 +#define STRCSPN_GENERIC __strcspn_generic #define __GI_STRCSPN __GI_strcspn #endif #endif @@ -48,7 +48,7 @@ ENTRY(STRCSPN) cmpl $0, __cpu_features+KIND_OFFSET(%rip) jne 1f call __init_cpu_features -1: leaq STRCSPN_SSE2(%rip), %rax +1: leaq STRCSPN_GENERIC(%rip), %rax testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip) jz 2f leaq STRCSPN_SSE42(%rip), %rax @@ -57,20 +57,20 @@ END(STRCSPN) # undef ENTRY # define ENTRY(name) \ - .type STRCSPN_SSE2, @function; \ - .globl STRCSPN_SSE2; \ + .type STRCSPN_GENERIC, @function; \ + .globl STRCSPN_GENERIC; \ .align 16; \ - STRCSPN_SSE2: cfi_startproc; \ + STRCSPN_GENERIC: cfi_startproc; \ CALL_MCOUNT # undef END # define END(name) \ - cfi_endproc; .size STRCSPN_SSE2, .-STRCSPN_SSE2 + cfi_endproc; .size STRCSPN_GENERIC, .-STRCSPN_GENERIC # undef libc_hidden_builtin_def /* It doesn't make sense to send libc-internal strcspn calls through a PLT. The speedup we get from using SSE4.2 instruction is likely eaten away by the indirect call in the PLT. */ # define libc_hidden_builtin_def(name) \ - .globl __GI_STRCSPN; __GI_STRCSPN = STRCSPN_SSE2 + .globl __GI_STRCSPN; __GI_STRCSPN = STRCSPN_GENERIC #endif #endif /* HAVE_SSE4_SUPPORT */ diff --git a/sysdeps/x86_64/multiarch/strspn.S b/sysdeps/x86_64/multiarch/strspn.S index 79fbf3c574..51e25bfc3f 100644 --- a/sysdeps/x86_64/multiarch/strspn.S +++ b/sysdeps/x86_64/multiarch/strspn.S @@ -33,7 +33,7 @@ ENTRY(strspn) cmpl $0, __cpu_features+KIND_OFFSET(%rip) jne 1f call __init_cpu_features -1: leaq __strspn_sse2(%rip), %rax +1: leaq __strspn_generic(%rip), %rax testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip) jz 2f leaq __strspn_sse42(%rip), %rax @@ -42,20 +42,20 @@ END(strspn) # undef ENTRY # define ENTRY(name) \ - .type __strspn_sse2, @function; \ - .globl __strspn_sse2; \ + .type __strspn_generic, @function; \ + .globl __strspn_generic; \ .align 16; \ - __strspn_sse2: cfi_startproc; \ + __strspn_generic: cfi_startproc; \ CALL_MCOUNT # undef END # define END(name) \ - cfi_endproc; .size __strspn_sse2, .-__strspn_sse2 + cfi_endproc; .size __strspn_generic, .-__strspn_generic # undef libc_hidden_builtin_def /* It doesn't make sense to send libc-internal strspn calls through a PLT. The speedup we get from using SSE4.2 instruction is likely eaten away by the indirect call in the PLT. */ # define libc_hidden_builtin_def(name) \ - .globl __GI_strspn; __GI_strspn = __strspn_sse2 + .globl __GI_strspn; __GI_strspn = __strspn_generic #endif #endif /* HAVE_SSE4_SUPPORT */ diff --git a/sysdeps/x86_64/multiarch/wcscpy.S b/sysdeps/x86_64/multiarch/wcscpy.S index e5ac97e558..73fd852b85 100644 --- a/sysdeps/x86_64/multiarch/wcscpy.S +++ b/sysdeps/x86_64/multiarch/wcscpy.S @@ -33,7 +33,7 @@ ENTRY(wcscpy) 1: testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip) jnz 2f - leaq __wcscpy_sse2(%rip), %rax + leaq __wcscpy_generic(%rip), %rax ret 2: leaq __wcscpy_ssse3(%rip), %rax diff --git a/sysdeps/x86_64/multiarch/wmemcmp.S b/sysdeps/x86_64/multiarch/wmemcmp.S index f7c8040527..1e35b8f59e 100644 --- a/sysdeps/x86_64/multiarch/wmemcmp.S +++ b/sysdeps/x86_64/multiarch/wmemcmp.S @@ -32,7 +32,7 @@ ENTRY(wmemcmp) 1: testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip) jnz 2f - leaq __wmemcmp_sse2(%rip), %rax + leaq __wmemcmp_generic(%rip), %rax ret 2: testl $bit_SSE4_1, __cpu_features+CPUID_OFFSET+index_SSE4_1(%rip) |