This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch hjl/x86 created. glibc-2.17-100-gae5b491


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/x86 has been created
        at  ae5b491bc523ad440184c4ba6bcfa15b35fe11c8 (commit)

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ae5b491bc523ad440184c4ba6bcfa15b35fe11c8

commit ae5b491bc523ad440184c4ba6bcfa15b35fe11c8
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 10 15:48:23 2013 -0800

    Rename xxx_ia32/xxx_sse2 to xxx_generic

diff --git a/ChangeLog.x86 b/ChangeLog.x86
index 1dcf0cb..5458d2e 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 2c282bd..24291c0 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 e79c1b9..7ea055a 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 946f1d6..d04424b 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 c2af6fb..b40197e 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 5925137..2127bfc 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 9ab4d1b..12e25a3 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 e994038..9cec969 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 43572f0..1a044cf 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 6e9053c..f7a83f7 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 93cd82f..d98ab00 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 9fd3f4c..f7a4341 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 6b689c0..17d85c5 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 2d47380..a33b09a 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 857ec9c..a97aea0 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 c380188..c92cd6f 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 90e1922..fb8f918 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 643cb2d..b6660e4 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 2fde77d..179b896 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 f94dc70..fc250e4 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 919a411..7433caf 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 df96165..a24bff2 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 79fbf3c..51e25bf 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 e5ac97e..73fd852 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 f7c8040..1e35b8f 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)

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5aff58049a0421cc531cfb3c452463d34528fe01

commit 5aff58049a0421cc531cfb3c452463d34528fe01
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 10 15:44:46 2013 -0800

    Move x86 multiarch files to x86/i686/multiarch

diff --git a/ChangeLog.x86 b/ChangeLog.x86
new file mode 100644
index 0000000..1dcf0cb
--- /dev/null
+++ b/ChangeLog.x86
@@ -0,0 +1,103 @@
+2012-12-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* sysdeps/i386/i686/multiarch/Makefile (aux): Don't add init-arch.
+	(tests): Don't add test-multiarch.
+	(gen-as-const-headers): Don't add ifunc-defines.sym.
+	(sysdep_routines): Remove strcasestr-nonascii, varshift, 
+	strncpy-c, strncat-c, strcspn-c, strpbrk-c, strspn-c, strstr-c,
+	strcasestr-c, wmemcmp-c and wcscpy-c.
+	(CFLAGS-varshift.c): Removed.
+	(CFLAGS-strcspn-c.c): Likewise.
+	(CFLAGS-strpbrk-c.c): Likewise.
+	(CFLAGS-strspn-c.c): Likewise.
+	(CFLAGS-strstr.c): Likewise.
+	(CFLAGS-strcasestr.c): Likewise.
+	(CFLAGS-strcasestr-nonascii.c): Likewise.
+	* sysdeps/x86_64/multiarch/Makefile: Likewise.
+	* sysdeps/i386/i686/multiarch/Implies: New file.
+	* sysdeps/x86/multiarch/Makefile: Likewise.
+	* sysdeps/x86_64/multiarch/Implies: Likewise.
+	* sysdeps/i386/i686/multiarch/Versions: Removed.
+	* sysdeps/i386/i686/multiarch/ifunc-defines.sym: Likewise.
+	* sysdeps/i386/i686/multiarch/init-arch.c: Likewise.
+	* sysdeps/i386/i686/multiarch/init-arch.h: Likewise.
+	* sysdeps/i386/i686/multiarch/sched_cpucount.c: Likewise.
+	* sysdeps/i386/i686/multiarch/strcasestr-c.c: Likewise.
+	* sysdeps/i386/i686/multiarch/strcasestr-nonascii.c: Likewise.
+	* sysdeps/i386/i686/multiarch/strcasestr.c: Likewise.
+	* sysdeps/i386/i686/multiarch/strcspn-c.c: Likewise.
+	* sysdeps/i386/i686/multiarch/strncat-c.c: Likewise.
+	* sysdeps/i386/i686/multiarch/strncpy-c.c: Likewise.
+	* sysdeps/i386/i686/multiarch/strpbrk-c.c: Likewise.
+	* sysdeps/i386/i686/multiarch/strspn-c.c: Likewise.
+	* sysdeps/i386/i686/multiarch/strstr-c.c: Likewise.
+	* sysdeps/i386/i686/multiarch/strstr.c: Likewise.
+	* sysdeps/i386/i686/multiarch/test-multiarch.c: Likewise.
+	* sysdeps/i386/i686/multiarch/varshift.c: Likewise.
+	* sysdeps/i386/i686/multiarch/wcscpy-c.c: Likewise.
+	* sysdeps/i386/i686/multiarch/wmemcmp-c.c: Likewise.
+	* sysdeps/x86_64/multiarch/Versions: Moved to ...
+	* sysdeps/x86/multiarch/Versions: Here.
+	* sysdeps/x86_64/multiarch/ifunc-defines.sym: Moved to ...
+	* sysdeps/x86/multiarch/ifunc-defines.sym: Here.
+	* sysdeps/x86_64/multiarch/init-arch.c: Moved to ...
+	* sysdeps/x86/multiarch/init-arch.c: Here.
+	* sysdeps/x86_64/multiarch/init-arch.h: Moved to ...
+	* sysdeps/x86/multiarch/init-arch.h: Here.
+	* sysdeps/x86_64/multiarch/sched_cpucount.c: Moved to ...
+	* sysdeps/x86/multiarch/sched_cpucount.c: Here.
+	* sysdeps/x86_64/multiarch/strcasestr-c.c: Moved to ...
+	* sysdeps/x86/multiarch/strcasestr-c.c: Here.
+	(__strcasestr_sse2): Defined to __strcasestr_ia32 if __x86_64__
+	isn't defined.
+	(__strcasestr): Remove the "#if 1" out codes.
+	* sysdeps/x86_64/multiarch/strcasestr-nonascii.c: Moved to ...
+	* sysdeps/x86/multiarch/strcasestr-nonascii.c: Here.
+	Include nmmintrin.h instead of xmmintrin.h.
+	* sysdeps/x86_64/multiarch/strcasestr.c: Moved to ...
+	* sysdeps/x86/multiarch/strcasestr.c: Here.
+	* sysdeps/x86_64/multiarch/strcspn-c.c: Moved to ...
+	* sysdeps/x86/multiarch/strcspn-c.c: Here.
+	(__strcspn_sse2): Defined to __strcspn_ia32 if __x86_64__ isn't
+	defined.
+	* sysdeps/x86_64/multiarch/strncat-c.c: Moved to ...
+	* sysdeps/x86/multiarch/strncat-c.c: Here.
+	(__strncat_sse2): Defined to __strncat_ia32 if __x86_64__ isn't
+	defined.
+	(libc_hidden_def): Use __strncat_ia32 if __x86_64__ isn't
+	defined.
+	* sysdeps/x86_64/multiarch/strncpy-c.c: Moved to ...
+	* sysdeps/x86/multiarch/strncpy-c.c: Here.
+	(__strncpy_sse2): Defined to __strncpy_ia32 if __x86_64__ isn't
+	defined.
+	(libc_hidden_def): Use __strncpy_ia32 if __x86_64__ isn't
+	defined.
+	* sysdeps/x86_64/multiarch/strpbrk-c.c: Moved to ...
+	* sysdeps/x86/multiarch/strpbrk-c.c: Here.
+	(__strpbrk_sse2): Defined to __strpbrk_ia32 if __x86_64__ isn't
+	defined.
+	* sysdeps/x86_64/multiarch/strspn-c.c: Moved to ...
+	* sysdeps/x86/multiarch/strspn-c.c: Here.
+	(__strspn_sse2): Defined to __strspn_ia32 if __x86_64__ isn't
+	defined.
+	* sysdeps/x86_64/multiarch/strstr-c.c: Moved to ...
+	* sysdeps/x86/multiarch/strstr-c.c: Here.
+	(__strstr_sse2): Defined to __strstr_ia32 if __x86_64__ isn't
+	defined.
+	(libc_hidden_def): Use __strstr_ia32 if __x86_64__ isn't defined.
+	* sysdeps/x86_64/multiarch/strstr.c: Moved to ...
+	* sysdeps/x86/multiarch/strstr.c: Here.
+	* sysdeps/x86_64/multiarch/test-multiarch.c: Moved to ...
+	* sysdeps/x86/multiarch/test-multiarch.c: Here.
+	* sysdeps/x86_64/multiarch/varshift.c: Moved to ...
+	* sysdeps/x86/multiarch/varshift.c: Here.
+	* sysdeps/x86_64/multiarch/varshift.h: Moved to ...
+	* sysdeps/x86/multiarch/varshift.h: Here.
+	* sysdeps/x86_64/multiarch/wcscpy-c.c: Moved to ...
+	* sysdeps/x86/multiarch/wcscpy-c.c: Here.
+	(__wcscpy_sse2): Defined to __wcscpy_ia32 if __x86_64__ isn't
+	defined.
+	* sysdeps/x86_64/multiarch/wmemcmp-c.c: Moved to ...
+	* sysdeps/x86/multiarch/wmemcmp-c.c: Here.
+	(__wmemcmp_sse2): Defined to __wmemcmp_ia32 if __x86_64__ isn't
+	defined.
diff --git a/sysdeps/i386/i686/multiarch/Implies b/sysdeps/i386/i686/multiarch/Implies
new file mode 100644
index 0000000..498d31e
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/Implies
@@ -0,0 +1 @@
+x86/i686/multiarch
diff --git a/sysdeps/i386/i686/multiarch/Makefile b/sysdeps/i386/i686/multiarch/Makefile
index 8946bfa..c7858ab 100644
--- a/sysdeps/i386/i686/multiarch/Makefile
+++ b/sysdeps/i386/i686/multiarch/Makefile
@@ -1,9 +1,3 @@
-ifeq ($(subdir),csu)
-aux += init-arch
-tests += test-multiarch
-gen-as-const-headers += ifunc-defines.sym
-endif
-
 ifeq ($(subdir),string)
 gen-as-const-headers += locale-defines.sym
 sysdep_routines += bzero-sse2 memset-sse2 memcpy-ssse3 mempcpy-ssse3 \
@@ -11,11 +5,11 @@ sysdep_routines += bzero-sse2 memset-sse2 memcpy-ssse3 mempcpy-ssse3 \
 		   memmove-ssse3-rep bcopy-ssse3 bcopy-ssse3-rep \
 		   memset-sse2-rep bzero-sse2-rep strcmp-ssse3 \
 		   strcmp-sse4 strncmp-c strncmp-ssse3 strncmp-sse4 \
-		   memcmp-ssse3 memcmp-sse4 strcasestr-nonascii varshift \
-		   strlen-sse2 strlen-sse2-bsf strncpy-c strcpy-ssse3 \
+		   memcmp-ssse3 memcmp-sse4 \
+		   strlen-sse2 strlen-sse2-bsf strcpy-ssse3 \
 		   strncpy-ssse3 stpcpy-ssse3 stpncpy-ssse3 strcpy-sse2 \
 		   strncpy-sse2 stpcpy-sse2 stpncpy-sse2 strcat-ssse3 \
-		   strcat-sse2 strncat-ssse3 strncat-sse2 strncat-c \
+		   strcat-sse2 strncat-ssse3 strncat-sse2 \
 		   strchr-sse2 strrchr-sse2 strchr-sse2-bsf strrchr-sse2-bsf \
 		   memchr-sse2 memchr-sse2-bsf \
 		   memrchr-sse2 memrchr-sse2-bsf memrchr-c \
@@ -24,22 +18,12 @@ sysdep_routines += bzero-sse2 memset-sse2 memcpy-ssse3 mempcpy-ssse3 \
 		   strcasecmp_l-c strcasecmp-c strcasecmp_l-ssse3 \
 		   strncase_l-c strncase-c strncase_l-ssse3 \
 		   strcasecmp_l-sse4 strncase_l-sse4
-ifeq (yes,$(config-cflags-sse4))
-sysdep_routines += strcspn-c strpbrk-c strspn-c strstr-c strcasestr-c
-CFLAGS-varshift.c += -msse4
-CFLAGS-strcspn-c.c += -msse4
-CFLAGS-strpbrk-c.c += -msse4
-CFLAGS-strspn-c.c += -msse4
-CFLAGS-strstr.c += -msse4
-CFLAGS-strcasestr.c += -msse4
-CFLAGS-strcasestr-nonascii.c += -msse4
-endif
 endif
 
 ifeq ($(subdir),wcsmbs)
 sysdep_routines += wcscmp-sse2 wcscmp-c wcslen-sse2 wcslen-c \
-		   wmemcmp-sse4 wmemcmp-ssse3 wmemcmp-c wcschr-sse2 \
-		   wcschr-c wcsrchr-sse2 wcsrchr-c wcscpy-ssse3 wcscpy-c
+		   wmemcmp-sse4 wmemcmp-ssse3 wcschr-sse2 \
+		   wcschr-c wcsrchr-sse2 wcsrchr-c wcscpy-ssse3
 endif
 
 ifeq (mathyes,$(subdir)$(config-cflags-avx))
diff --git a/sysdeps/i386/i686/multiarch/init-arch.c b/sysdeps/i386/i686/multiarch/init-arch.c
deleted file mode 100644
index 00a94d8..0000000
--- 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 cd2d0be..0000000
--- 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/sched_cpucount.c b/sysdeps/i386/i686/multiarch/sched_cpucount.c
deleted file mode 100644
index 7db31b0..0000000
--- a/sysdeps/i386/i686/multiarch/sched_cpucount.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/x86_64/multiarch/sched_cpucount.c>
diff --git a/sysdeps/i386/i686/multiarch/strcasestr-c.c b/sysdeps/i386/i686/multiarch/strcasestr-c.c
deleted file mode 100644
index c1d6dac..0000000
--- 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/strcasestr-nonascii.c b/sysdeps/i386/i686/multiarch/strcasestr-nonascii.c
deleted file mode 100644
index 4cc4444..0000000
--- a/sysdeps/i386/i686/multiarch/strcasestr-nonascii.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#include <nmmintrin.h>
-#include <sysdeps/x86_64/multiarch/strcasestr-nonascii.c>
diff --git a/sysdeps/i386/i686/multiarch/strcasestr.c b/sysdeps/i386/i686/multiarch/strcasestr.c
deleted file mode 100644
index 511bb29..0000000
--- a/sysdeps/i386/i686/multiarch/strcasestr.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/x86_64/multiarch/strcasestr.c>
diff --git a/sysdeps/i386/i686/multiarch/strcspn-c.c b/sysdeps/i386/i686/multiarch/strcspn-c.c
deleted file mode 100644
index 6d61e19..0000000
--- a/sysdeps/i386/i686/multiarch/strcspn-c.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define __strcspn_sse2 __strcspn_ia32
-#include <sysdeps/x86_64/multiarch/strcspn-c.c>
diff --git a/sysdeps/i386/i686/multiarch/strncat-c.c b/sysdeps/i386/i686/multiarch/strncat-c.c
deleted file mode 100644
index 132a000..0000000
--- a/sysdeps/i386/i686/multiarch/strncat-c.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#define STRNCAT __strncat_ia32
-#ifdef SHARED
-#undef libc_hidden_def
-#define libc_hidden_def(name) \
-  __hidden_ver1 (__strncat_ia32, __GI___strncat, __strncat_ia32);
-#endif
-
-#include "string/strncat.c"
diff --git a/sysdeps/i386/i686/multiarch/strncpy-c.c b/sysdeps/i386/i686/multiarch/strncpy-c.c
deleted file mode 100644
index 201e3f9..0000000
--- a/sysdeps/i386/i686/multiarch/strncpy-c.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#define STRNCPY __strncpy_ia32
-#ifdef SHARED
-# undef libc_hidden_builtin_def
-# define libc_hidden_builtin_def(name)  \
-    __hidden_ver1 (__strncpy_ia32, __GI_strncpy, __strncpy_ia32);
-#endif
-
-#include "string/strncpy.c"
diff --git a/sysdeps/i386/i686/multiarch/strpbrk-c.c b/sysdeps/i386/i686/multiarch/strpbrk-c.c
deleted file mode 100644
index 5db6205..0000000
--- a/sysdeps/i386/i686/multiarch/strpbrk-c.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define __strpbrk_sse2 __strpbrk_ia32
-#include <sysdeps/x86_64/multiarch/strpbrk-c.c>
diff --git a/sysdeps/i386/i686/multiarch/strspn-c.c b/sysdeps/i386/i686/multiarch/strspn-c.c
deleted file mode 100644
index bea09de..0000000
--- a/sysdeps/i386/i686/multiarch/strspn-c.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define __strspn_sse2 __strspn_ia32
-#include <sysdeps/x86_64/multiarch/strspn-c.c>
diff --git a/sysdeps/i386/i686/multiarch/strstr-c.c b/sysdeps/i386/i686/multiarch/strstr-c.c
deleted file mode 100644
index 7516c7f..0000000
--- a/sysdeps/i386/i686/multiarch/strstr-c.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Multiple versions of strstr
-   All versions must be listed in ifunc-impl-list.c.  */
-
-#include "init-arch.h"
-
-#define STRSTR __strstr_ia32
-#if defined SHARED && defined DO_VERSIONING && !defined NO_HIDDEN
-#undef libc_hidden_builtin_def
-#define libc_hidden_builtin_def(name) \
-  __hidden_ver1 (__strstr_ia32, __GI_strstr, __strstr_ia32);
-#endif
-
-/* Redefine strstr so that the compiler won't complain about the type
-   mismatch with the IFUNC selector in strong_alias, below.  */
-#undef strstr
-#define strstr __redirect_strstr
-
-#include "string/strstr.c"
-
-extern __typeof (__redirect_strstr) __strstr_sse42 attribute_hidden;
-extern __typeof (__redirect_strstr) __strstr_ia32 attribute_hidden;
-
-/* 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_ia32)
-
-#undef strstr
-strong_alias (__libc_strstr, strstr)
diff --git a/sysdeps/i386/i686/multiarch/strstr.c b/sysdeps/i386/i686/multiarch/strstr.c
deleted file mode 100644
index a97428c..0000000
--- a/sysdeps/i386/i686/multiarch/strstr.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/x86_64/multiarch/strstr.c>
diff --git a/sysdeps/i386/i686/multiarch/test-multiarch.c b/sysdeps/i386/i686/multiarch/test-multiarch.c
deleted file mode 100644
index 593cfec..0000000
--- a/sysdeps/i386/i686/multiarch/test-multiarch.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/x86_64/multiarch/test-multiarch.c>
diff --git a/sysdeps/i386/i686/multiarch/varshift.c b/sysdeps/i386/i686/multiarch/varshift.c
deleted file mode 100644
index 7760b96..0000000
--- a/sysdeps/i386/i686/multiarch/varshift.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/x86_64/multiarch/varshift.c>
diff --git a/sysdeps/i386/i686/multiarch/wcscpy-c.c b/sysdeps/i386/i686/multiarch/wcscpy-c.c
deleted file mode 100644
index a3c4024..0000000
--- a/sysdeps/i386/i686/multiarch/wcscpy-c.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifndef NOT_IN_libc
-# define wcscpy  __wcscpy_ia32
-#endif
-
-#include "wcsmbs/wcscpy.c"
diff --git a/sysdeps/i386/i686/multiarch/wmemcmp-c.c b/sysdeps/i386/i686/multiarch/wmemcmp-c.c
deleted file mode 100644
index bd37660..0000000
--- a/sysdeps/i386/i686/multiarch/wmemcmp-c.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <wchar.h>
-
-#ifndef NOT_IN_libc
-# define WMEMCMP  __wmemcmp_ia32
-#endif
-
-extern __typeof (wmemcmp) __wmemcmp_ia32;
-
-#include "wcsmbs/wmemcmp.c"
diff --git a/sysdeps/x86/i686/multiarch/Makefile b/sysdeps/x86/i686/multiarch/Makefile
new file mode 100644
index 0000000..3673c27
--- /dev/null
+++ b/sysdeps/x86/i686/multiarch/Makefile
@@ -0,0 +1,25 @@
+ifeq ($(subdir),csu)
+aux += init-arch
+tests += test-multiarch
+gen-as-const-headers += ifunc-defines.sym
+endif
+
+ifeq ($(subdir),string)
+sysdep_routines += strcasestr-nonascii strncat-c strncpy-c
+
+ifeq (yes,$(config-cflags-sse4))
+sysdep_routines += strcasestr-c strcspn-c strpbrk-c strspn-c strstr-c \
+		   varshift
+CFLAGS-strcasestr.c += -msse4
+CFLAGS-strcasestr-nonascii.c += -msse4
+CFLAGS-strcspn-c.c += -msse4
+CFLAGS-strpbrk-c.c += -msse4
+CFLAGS-strspn-c.c += -msse4
+CFLAGS-strstr.c += -msse4
+CFLAGS-varshift.c += -msse4
+endif
+endif
+
+ifeq ($(subdir),wcsmbs)
+sysdep_routines +=  wcscpy-c wmemcmp-c
+endif
diff --git a/sysdeps/i386/i686/multiarch/Versions b/sysdeps/x86/i686/multiarch/Versions
similarity index 100%
rename from sysdeps/i386/i686/multiarch/Versions
rename to sysdeps/x86/i686/multiarch/Versions
diff --git a/sysdeps/i386/i686/multiarch/ifunc-defines.sym b/sysdeps/x86/i686/multiarch/ifunc-defines.sym
similarity index 100%
rename from sysdeps/i386/i686/multiarch/ifunc-defines.sym
rename to sysdeps/x86/i686/multiarch/ifunc-defines.sym
diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86/i686/multiarch/init-arch.c
similarity index 100%
rename from sysdeps/x86_64/multiarch/init-arch.c
rename to sysdeps/x86/i686/multiarch/init-arch.c
diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86/i686/multiarch/init-arch.h
similarity index 100%
rename from sysdeps/x86_64/multiarch/init-arch.h
rename to sysdeps/x86/i686/multiarch/init-arch.h
diff --git a/sysdeps/x86_64/multiarch/sched_cpucount.c b/sysdeps/x86/i686/multiarch/sched_cpucount.c
similarity index 100%
rename from sysdeps/x86_64/multiarch/sched_cpucount.c
rename to sysdeps/x86/i686/multiarch/sched_cpucount.c
diff --git a/sysdeps/x86_64/multiarch/strcasestr-c.c b/sysdeps/x86/i686/multiarch/strcasestr-c.c
similarity index 83%
rename from sysdeps/x86_64/multiarch/strcasestr-c.c
rename to sysdeps/x86/i686/multiarch/strcasestr-c.c
index c13a4c4..43572f0 100644
--- a/sysdeps/x86_64/multiarch/strcasestr-c.c
+++ b/sysdeps/x86/i686/multiarch/strcasestr-c.c
@@ -3,6 +3,10 @@
 
 #include "init-arch.h"
 
+#ifndef __x86_64__
+# define __strcasestr_sse2 __strcasestr_ia32
+#endif
+
 #define STRCASESTR __strcasestr_sse2
 
 #include "string/strcasestr.c"
@@ -10,10 +14,5 @@
 extern char *__strcasestr_sse42 (const char *, const char *) attribute_hidden;
 extern __typeof (__strcasestr_sse2) __strcasestr_sse2 attribute_hidden;
 
-#if 1
 libc_ifunc (__strcasestr,
 	    HAS_SSE4_2 ? __strcasestr_sse42 : __strcasestr_sse2);
-#else
-libc_ifunc (__strcasestr,
-	    0 ? __strcasestr_sse42 : __strcasestr_sse2);
-#endif
diff --git a/sysdeps/x86_64/multiarch/strcasestr-nonascii.c b/sysdeps/x86/i686/multiarch/strcasestr-nonascii.c
similarity index 98%
rename from sysdeps/x86_64/multiarch/strcasestr-nonascii.c
rename to sysdeps/x86/i686/multiarch/strcasestr-nonascii.c
index 85b7b35..92f1508 100644
--- a/sysdeps/x86_64/multiarch/strcasestr-nonascii.c
+++ b/sysdeps/x86/i686/multiarch/strcasestr-nonascii.c
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <ctype.h>
-#include <xmmintrin.h>
+#include <nmmintrin.h>
 
 
 /* Similar to __m128i_strloadu.  Convert to lower case for none-POSIX/C
diff --git a/sysdeps/x86_64/multiarch/strcasestr.c b/sysdeps/x86/i686/multiarch/strcasestr.c
similarity index 100%
rename from sysdeps/x86_64/multiarch/strcasestr.c
rename to sysdeps/x86/i686/multiarch/strcasestr.c
diff --git a/sysdeps/x86_64/multiarch/strcspn-c.c b/sysdeps/x86/i686/multiarch/strcspn-c.c
similarity index 98%
rename from sysdeps/x86_64/multiarch/strcspn-c.c
rename to sysdeps/x86/i686/multiarch/strcspn-c.c
index 9c0dcf0..6e9053c 100644
--- a/sysdeps/x86_64/multiarch/strcspn-c.c
+++ b/sysdeps/x86/i686/multiarch/strcspn-c.c
@@ -53,6 +53,10 @@
    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_SSE42 __strcspn_sse42
diff --git a/sysdeps/x86/i686/multiarch/strncat-c.c b/sysdeps/x86/i686/multiarch/strncat-c.c
new file mode 100644
index 0000000..93cd82f
--- /dev/null
+++ b/sysdeps/x86/i686/multiarch/strncat-c.c
@@ -0,0 +1,17 @@
+#ifndef __x86_64__
+# define __strncat_sse2 __strncat_ia32
+#endif
+
+#define STRNCAT __strncat_sse2
+#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
+#endif
+
+#include "string/strncat.c"
diff --git a/sysdeps/x86/i686/multiarch/strncpy-c.c b/sysdeps/x86/i686/multiarch/strncpy-c.c
new file mode 100644
index 0000000..9fd3f4c
--- /dev/null
+++ b/sysdeps/x86/i686/multiarch/strncpy-c.c
@@ -0,0 +1,17 @@
+#ifndef __x86_64__
+# define __strncpy_sse2 __strncpy_ia32
+#endif
+
+#define STRNCPY __strncpy_sse2
+#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
+#endif
+
+#include "strncpy.c"
diff --git a/sysdeps/x86_64/multiarch/strpbrk-c.c b/sysdeps/x86/i686/multiarch/strpbrk-c.c
similarity index 80%
rename from sysdeps/x86_64/multiarch/strpbrk-c.c
rename to sysdeps/x86/i686/multiarch/strpbrk-c.c
index bbf5c49..6b689c0 100644
--- a/sysdeps/x86_64/multiarch/strpbrk-c.c
+++ b/sysdeps/x86/i686/multiarch/strpbrk-c.c
@@ -1,6 +1,9 @@
 /* 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_SSE42 __strpbrk_sse42
diff --git a/sysdeps/x86_64/multiarch/strspn-c.c b/sysdeps/x86/i686/multiarch/strspn-c.c
similarity index 98%
rename from sysdeps/x86_64/multiarch/strspn-c.c
rename to sysdeps/x86/i686/multiarch/strspn-c.c
index 8128cb9..2d47380 100644
--- a/sysdeps/x86_64/multiarch/strspn-c.c
+++ b/sysdeps/x86/i686/multiarch/strspn-c.c
@@ -21,6 +21,10 @@
 #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
diff --git a/sysdeps/x86_64/multiarch/strstr-c.c b/sysdeps/x86/i686/multiarch/strstr-c.c
similarity index 87%
rename from sysdeps/x86_64/multiarch/strstr-c.c
rename to sysdeps/x86/i686/multiarch/strstr-c.c
index 42bbe48..857ec9c 100644
--- a/sysdeps/x86_64/multiarch/strstr-c.c
+++ b/sysdeps/x86/i686/multiarch/strstr-c.c
@@ -24,11 +24,20 @@
 #include <string.h>
 #undef  strstr
 
+#ifndef __x86_64__
+# define __strstr_sse2 __strstr_ia32
+#endif
+
 #define STRSTR __strstr_sse2
 #ifdef SHARED
 # undef libc_hidden_builtin_def
-# define libc_hidden_builtin_def(name) \
+# 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
 #endif
 
 #include "string/strstr.c"
diff --git a/sysdeps/x86_64/multiarch/strstr.c b/sysdeps/x86/i686/multiarch/strstr.c
similarity index 100%
rename from sysdeps/x86_64/multiarch/strstr.c
rename to sysdeps/x86/i686/multiarch/strstr.c
diff --git a/sysdeps/x86_64/multiarch/test-multiarch.c b/sysdeps/x86/i686/multiarch/test-multiarch.c
similarity index 100%
rename from sysdeps/x86_64/multiarch/test-multiarch.c
rename to sysdeps/x86/i686/multiarch/test-multiarch.c
diff --git a/sysdeps/x86_64/multiarch/varshift.c b/sysdeps/x86/i686/multiarch/varshift.c
similarity index 100%
rename from sysdeps/x86_64/multiarch/varshift.c
rename to sysdeps/x86/i686/multiarch/varshift.c
diff --git a/sysdeps/x86_64/multiarch/varshift.h b/sysdeps/x86/i686/multiarch/varshift.h
similarity index 100%
rename from sysdeps/x86_64/multiarch/varshift.h
rename to sysdeps/x86/i686/multiarch/varshift.h
diff --git a/sysdeps/x86/i686/multiarch/wcscpy-c.c b/sysdeps/x86/i686/multiarch/wcscpy-c.c
new file mode 100644
index 0000000..c380188
--- /dev/null
+++ b/sysdeps/x86/i686/multiarch/wcscpy-c.c
@@ -0,0 +1,8 @@
+#ifndef NOT_IN_libc
+# ifndef __x86_64__
+#  define __wcscpy_sse2 __wcscpy_ia32
+# endif
+# define wcscpy  __wcscpy_sse2
+#endif
+
+#include "wcsmbs/wcscpy.c"
diff --git a/sysdeps/x86_64/multiarch/wmemcmp-c.c b/sysdeps/x86/i686/multiarch/wmemcmp-c.c
similarity index 69%
rename from sysdeps/x86_64/multiarch/wmemcmp-c.c
rename to sysdeps/x86/i686/multiarch/wmemcmp-c.c
index 1074238..90e1922 100644
--- a/sysdeps/x86_64/multiarch/wmemcmp-c.c
+++ b/sysdeps/x86/i686/multiarch/wmemcmp-c.c
@@ -1,6 +1,9 @@
 #ifndef NOT_IN_libc
 # include <wchar.h>
 
+# ifndef __x86_64__
+#  define __wmemcmp_sse2 __wmemcmp_ia32
+# endif
 # define WMEMCMP  __wmemcmp_sse2
 
 extern __typeof (wmemcmp) __wmemcmp_sse2;
diff --git a/sysdeps/x86_64/multiarch/Implies b/sysdeps/x86_64/multiarch/Implies
new file mode 100644
index 0000000..498d31e
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/Implies
@@ -0,0 +1 @@
+x86/i686/multiarch
diff --git a/sysdeps/x86_64/multiarch/Makefile b/sysdeps/x86_64/multiarch/Makefile
index dd6c27d..65b586c 100644
--- a/sysdeps/x86_64/multiarch/Makefile
+++ b/sysdeps/x86_64/multiarch/Makefile
@@ -1,15 +1,9 @@
-ifeq ($(subdir),csu)
-aux += init-arch
-tests += test-multiarch
-gen-as-const-headers += ifunc-defines.sym
-endif
-
 ifeq ($(subdir),string)
 
-sysdep_routines += strncat-c stpncpy-c strncpy-c strcmp-ssse3 strncmp-ssse3 \
+sysdep_routines += stpncpy-c strcmp-ssse3 strncmp-ssse3 \
 		   strend-sse4 memcmp-sse4 memcpy-ssse3 mempcpy-ssse3 \
 		   memmove-ssse3 memcpy-ssse3-back mempcpy-ssse3-back \
-		   memmove-ssse3-back strcasestr-nonascii strcasecmp_l-ssse3 \
+		   memmove-ssse3-back strcasecmp_l-ssse3 \
 		   strncase_l-ssse3 strlen-sse4 strlen-sse2-no-bsf memset-x86-64 \
 		   strcpy-ssse3 strncpy-ssse3 stpcpy-ssse3 stpncpy-ssse3 \
 		   strcpy-sse2-unaligned strncpy-sse2-unaligned \
@@ -18,18 +12,8 @@ sysdep_routines += strncat-c stpncpy-c strncpy-c strcmp-ssse3 strncmp-ssse3 \
 		   strcat-ssse3 strncat-ssse3 strlen-sse2-pminub \
 		   strnlen-sse2-no-bsf strrchr-sse2-no-bsf strchr-sse2-no-bsf \
 		   memcmp-ssse3
-ifeq (yes,$(config-cflags-sse4))
-sysdep_routines += strcspn-c strpbrk-c strspn-c strstr-c strcasestr-c varshift
-CFLAGS-varshift.c += -msse4
-CFLAGS-strcspn-c.c += -msse4
-CFLAGS-strpbrk-c.c += -msse4
-CFLAGS-strspn-c.c += -msse4
-CFLAGS-strstr.c += -msse4
-CFLAGS-strcasestr.c += -msse4
-CFLAGS-strcasestr-nonascii.c += -msse4
-endif
 endif
 
 ifeq ($(subdir),wcsmbs)
-sysdep_routines += wmemcmp-sse4 wmemcmp-ssse3 wmemcmp-c wcscpy-ssse3 wcscpy-c
+sysdep_routines += wmemcmp-sse4 wmemcmp-ssse3 wcscpy-ssse3
 endif
diff --git a/sysdeps/x86_64/multiarch/Versions b/sysdeps/x86_64/multiarch/Versions
deleted file mode 100644
index 59b185a..0000000
--- a/sysdeps/x86_64/multiarch/Versions
+++ /dev/null
@@ -1,5 +0,0 @@
-libc {
-  GLIBC_PRIVATE {
-    __get_cpu_features;
-  }
-}
diff --git a/sysdeps/x86_64/multiarch/ifunc-defines.sym b/sysdeps/x86_64/multiarch/ifunc-defines.sym
deleted file mode 100644
index eb1538a..0000000
--- a/sysdeps/x86_64/multiarch/ifunc-defines.sym
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "init-arch.h"
-#include <stddef.h>
-
---
-
-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)
-CPUID_EBX_OFFSET	offsetof (struct cpuid_registers, ebx)
-CPUID_ECX_OFFSET	offsetof (struct cpuid_registers, ecx)
-CPUID_EDX_OFFSET	offsetof (struct cpuid_registers, edx)
-FAMILY_OFFSET		offsetof (struct cpu_features, family)
-MODEL_OFFSET		offsetof (struct cpu_features, model)
-FEATURE_OFFSET		offsetof (struct cpu_features, feature)
-FEATURE_SIZE		sizeof (unsigned int)
-
-COMMON_CPUID_INDEX_1
-FEATURE_INDEX_1
diff --git a/sysdeps/x86_64/multiarch/strncat-c.c b/sysdeps/x86_64/multiarch/strncat-c.c
deleted file mode 100644
index a3cdbff..0000000
--- a/sysdeps/x86_64/multiarch/strncat-c.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#define STRNCAT __strncat_sse2
-#ifdef SHARED
-#undef libc_hidden_def
-#define libc_hidden_def(name) \
-  __hidden_ver1 (__strncat_sse2, __GI___strncat, __strncat_sse2);
-#endif
-
-#include "string/strncat.c"
diff --git a/sysdeps/x86_64/multiarch/strncpy-c.c b/sysdeps/x86_64/multiarch/strncpy-c.c
deleted file mode 100644
index 296c32c..0000000
--- a/sysdeps/x86_64/multiarch/strncpy-c.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#define STRNCPY __strncpy_sse2
-#ifdef SHARED
-#undef libc_hidden_builtin_def
-#define libc_hidden_builtin_def(name) \
-  __hidden_ver1 (__strncpy_sse2, __GI_strncpy, __strncpy_sse2);
-#endif
-
-#include "strncpy.c"
diff --git a/sysdeps/x86_64/multiarch/wcscpy-c.c b/sysdeps/x86_64/multiarch/wcscpy-c.c
deleted file mode 100644
index f27c069..0000000
--- a/sysdeps/x86_64/multiarch/wcscpy-c.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifndef NOT_IN_libc
-# define wcscpy  __wcscpy_sse2
-#endif
-
-#include "wcsmbs/wcscpy.c"

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8bcd3c29ee108e72cc7a0b01efbcdc45ee8b91c9

commit 8bcd3c29ee108e72cc7a0b01efbcdc45ee8b91c9
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat Jan 5 16:38:32 2013 -0800

    Add sysdeps/x86/i686

diff --git a/ChangeLog.i686 b/ChangeLog.i686
new file mode 100644
index 0000000..ed64629
--- /dev/null
+++ b/ChangeLog.i686
@@ -0,0 +1,20 @@
+2013-01-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* sysdeps/i386/i686/Implies: Add x86/i686.
+	* sysdeps/x86_64/Implies: Likewise.
+	* sysdeps/i386/i686/Makefile (sysdep_routines): Don't add
+	hp-timing nor cacheinfo.
+	(elide-routines.os): Don't add hp-timing.
+	* sysdeps/x86_64/Makefile: Likewise.
+	* sysdeps/i386/i686/cacheinfo.c: Updated.
+	* sysdeps/x86_64/multiarch/cacheinfo.c: Likewise.
+	* sysdeps/i386/i686/hp-timing.c: Moved to ...
+	* sysdeps/x86/i686/hp-timing.c: Here.
+	* sysdeps/i386/i686/hp-timing.h: Moved to ...
+	* sysdeps/x86/i686/hp-timing.h: Here.
+	(HP_TIMING_NOW): Support x86-64.
+	(HP_TIMING_ACCUM): Likewise.
+	* sysdeps/x86/i686/Makefile: New file.
+	* sysdeps/x86_64/cacheinfo.c: Removed.
+	* sysdeps/x86_64/hp-timing.c: Likewise.
+	* sysdeps/x86_64/hp-timing.h: Likewise.
diff --git a/sysdeps/i386/i686/Implies b/sysdeps/i386/i686/Implies
index e1fcccd..656cd9e 100644
--- a/sysdeps/i386/i686/Implies
+++ b/sysdeps/i386/i686/Implies
@@ -1,4 +1,5 @@
 # Due to the reordering and the other nifty extensions in the i686 it is
 # not really good to use heavily i586 optimized code on a i686.  It's
 # better to use i486/i386 code.
+x86/i686
 i386/i486
diff --git a/sysdeps/i386/i686/Makefile b/sysdeps/i386/i686/Makefile
index e6b2924..f10e368 100644
--- a/sysdeps/i386/i686/Makefile
+++ b/sysdeps/i386/i686/Makefile
@@ -1,15 +1,6 @@
-ifeq ($(subdir),csu)
-sysdep_routines += hp-timing
-elide-routines.os += hp-timing
-endif
-
 # So that we can test __m128's alignment
 stack-align-test-flags += -msse
 
-ifeq ($(subdir),string)
-sysdep_routines += cacheinfo
-endif
-
 ifeq (yes,$(config-asflags-i686))
 CFLAGS-.o += -Wa,-mtune=i686
 CFLAGS-.os += -Wa,-mtune=i686
diff --git a/sysdeps/i386/i686/cacheinfo.c b/sysdeps/i386/i686/cacheinfo.c
index 0f869df..dfee51a 100644
--- a/sysdeps/i386/i686/cacheinfo.c
+++ b/sysdeps/i386/i686/cacheinfo.c
@@ -1,4 +1,4 @@
 #define DISABLE_PREFETCHW
 #define DISABLE_PREFERRED_MEMORY_INSTRUCTION
 
-#include <sysdeps/x86_64/cacheinfo.c>
+#include <sysdeps/x86/i686/cacheinfo.c>
diff --git a/sysdeps/x86/i686/Makefile b/sysdeps/x86/i686/Makefile
new file mode 100644
index 0000000..0aabcc5
--- /dev/null
+++ b/sysdeps/x86/i686/Makefile
@@ -0,0 +1,8 @@
+ifeq ($(subdir),csu)
+sysdep_routines += hp-timing
+elide-routines.os += hp-timing
+endif
+
+ifeq ($(subdir),string)
+sysdep_routines += cacheinfo
+endif
diff --git a/sysdeps/x86_64/cacheinfo.c b/sysdeps/x86/i686/cacheinfo.c
similarity index 100%
rename from sysdeps/x86_64/cacheinfo.c
rename to sysdeps/x86/i686/cacheinfo.c
diff --git a/sysdeps/i386/i686/hp-timing.c b/sysdeps/x86/i686/hp-timing.c
similarity index 100%
rename from sysdeps/i386/i686/hp-timing.c
rename to sysdeps/x86/i686/hp-timing.c
diff --git a/sysdeps/i386/i686/hp-timing.h b/sysdeps/x86/i686/hp-timing.h
similarity index 88%
rename from sysdeps/i386/i686/hp-timing.h
rename to sysdeps/x86/i686/hp-timing.h
index 920d441..ba702d7 100644
--- a/sysdeps/i386/i686/hp-timing.h
+++ b/sysdeps/x86/i686/hp-timing.h
@@ -91,7 +91,15 @@ typedef unsigned long long int hp_timing_t;
    running in this moment.  This could be changed by using a barrier like
    'cpuid' right before the `rdtsc' instruciton.  But we are not interested
    in accurate clock cycles here so we don't do this.  */
-#define HP_TIMING_NOW(Var)	__asm__ __volatile__ ("rdtsc" : "=A" (Var))
+#ifdef __x86_64__
+/* The "=A" constraint used in 32-bit mode does not work in 64-bit mode.  */
+# define HP_TIMING_NOW(Var) \
+  ({ unsigned int _hi, _lo; \
+     asm volatile ("rdtsc" : "=a" (_lo), "=d" (_hi)); \
+     (Var) = ((unsigned long long int) _hi << 32) | _lo; })
+#else
+# define HP_TIMING_NOW(Var)	__asm__ __volatile__ ("rdtsc" : "=A" (Var))
+#endif
 
 /* Use two 'rdtsc' instructions in a row to find out how long it takes.  */
 #define HP_TIMING_DIFF_INIT() \
@@ -115,8 +123,17 @@ typedef unsigned long long int hp_timing_t;
 /* It's simple arithmetic for us.  */
 #define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
 
+#ifdef __x86_64__
+/* The funny business for 32-bit mode is not required here.  */
+# define HP_TIMING_ACCUM(Sum, Diff)					      \
+  do {									      \
+    hp_timing_t __diff = (Diff) - GLRO(dl_hp_timing_overhead);		      \
+    __asm__ __volatile__ ("lock; addq %1, %0"				      \
+			  : "=m" (Sum) : "r" (__diff), "m" (Sum));	      \
+  } while (0)
+#else
 /* We have to jump through hoops to get this correctly implemented.  */
-#define HP_TIMING_ACCUM(Sum, Diff) \
+# define HP_TIMING_ACCUM(Sum, Diff) \
   do {									      \
     int __not_done;							      \
     hp_timing_t __oldval = (Sum);					      \
@@ -137,6 +154,7 @@ typedef unsigned long long int hp_timing_t;
       }									      \
     while ((unsigned char) __not_done);					      \
   } while (0)
+#endif
 
 /* No threads, no extra work.  */
 #define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
diff --git a/sysdeps/x86_64/Implies b/sysdeps/x86_64/Implies
index 811c19a..fc0daf3 100644
--- a/sysdeps/x86_64/Implies
+++ b/sysdeps/x86_64/Implies
@@ -1,4 +1,5 @@
 x86
+x86/i686
 ieee754/ldbl-96
 ieee754/dbl-64/wordsize-64
 ieee754/dbl-64
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
index 78c98e7..a5976ea 100644
--- a/sysdeps/x86_64/Makefile
+++ b/sysdeps/x86_64/Makefile
@@ -2,8 +2,6 @@
 long-double-fcts = yes
 
 ifeq ($(subdir),csu)
-sysdep_routines += hp-timing
-elide-routines.os += hp-timing
 gen-as-const-headers += link-defines.sym
 endif
 
@@ -16,7 +14,7 @@ tests += tst-mallocalign1
 endif
 
 ifeq ($(subdir),string)
-sysdep_routines += cacheinfo strcasecmp_l-nonascii strncase_l-nonascii
+sysdep_routines += strcasecmp_l-nonascii strncase_l-nonascii
 gen-as-const-headers += locale-defines.sym
 endif
 
diff --git a/sysdeps/x86_64/hp-timing.c b/sysdeps/x86_64/hp-timing.c
deleted file mode 100644
index 289ca4c..0000000
--- a/sysdeps/x86_64/hp-timing.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* We can use the i686 implementation without changes.  */
-#include <sysdeps/i386/i686/hp-timing.c>
diff --git a/sysdeps/x86_64/hp-timing.h b/sysdeps/x86_64/hp-timing.h
deleted file mode 100644
index 87dc0bb..0000000
--- a/sysdeps/x86_64/hp-timing.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* High precision, low overhead timing functions.  x86-64 version.
-   Copyright (C) 2002-2013 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _HP_TIMING_H
-
-/* We can use some of the i686 implementation without changes.  */
-# include <sysdeps/i386/i686/hp-timing.h>
-
-/* The "=A" constraint used in 32-bit mode does not work in 64-bit mode.  */
-# undef HP_TIMING_NOW
-# define HP_TIMING_NOW(Var) \
-  ({ unsigned int _hi, _lo; \
-     asm volatile ("rdtsc" : "=a" (_lo), "=d" (_hi)); \
-     (Var) = ((unsigned long long int) _hi << 32) | _lo; })
-
-/* The funny business for 32-bit mode is not required here.  */
-# undef HP_TIMING_ACCUM
-# define HP_TIMING_ACCUM(Sum, Diff)					      \
-  do {									      \
-    hp_timing_t __diff = (Diff) - GLRO(dl_hp_timing_overhead);		      \
-    __asm__ __volatile__ ("lock; addq %1, %0"				      \
-			  : "=m" (Sum) : "r" (__diff), "m" (Sum));	      \
-  } while (0)
-
-#endif /* hp-timing.h */
diff --git a/sysdeps/x86_64/multiarch/cacheinfo.c b/sysdeps/x86_64/multiarch/cacheinfo.c
index f87b8dc..f6cd3e4 100644
--- a/sysdeps/x86_64/multiarch/cacheinfo.c
+++ b/sysdeps/x86_64/multiarch/cacheinfo.c
@@ -1,2 +1,2 @@
 #define DISABLE_PREFERRED_MEMORY_INSTRUCTION
-#include "../cacheinfo.c"
+#include <sysdeps/x86/i686/cacheinfo.c>

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]