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.16-ports-merge-874-gf4ecf25


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  f4ecf25ab7f43fd3605bf9c0f5cf6ac9714115ae (commit)

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

commit f4ecf25ab7f43fd3605bf9c0f5cf6ac9714115ae
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Dec 14 09:33:07 2012 -0800

    Move x86 multiarch files to sysdeps/x86/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..9f98fd1
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/Implies
@@ -0,0 +1 @@
+x86/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/multiarch/Makefile b/sysdeps/x86/multiarch/Makefile
new file mode 100644
index 0000000..3673c27
--- /dev/null
+++ b/sysdeps/x86/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/multiarch/Versions
similarity index 100%
rename from sysdeps/i386/i686/multiarch/Versions
rename to sysdeps/x86/multiarch/Versions
diff --git a/sysdeps/i386/i686/multiarch/ifunc-defines.sym b/sysdeps/x86/multiarch/ifunc-defines.sym
similarity index 100%
rename from sysdeps/i386/i686/multiarch/ifunc-defines.sym
rename to sysdeps/x86/multiarch/ifunc-defines.sym
diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86/multiarch/init-arch.c
similarity index 100%
rename from sysdeps/x86_64/multiarch/init-arch.c
rename to sysdeps/x86/multiarch/init-arch.c
diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86/multiarch/init-arch.h
similarity index 100%
rename from sysdeps/x86_64/multiarch/init-arch.h
rename to sysdeps/x86/multiarch/init-arch.h
diff --git a/sysdeps/x86_64/multiarch/sched_cpucount.c b/sysdeps/x86/multiarch/sched_cpucount.c
similarity index 100%
rename from sysdeps/x86_64/multiarch/sched_cpucount.c
rename to sysdeps/x86/multiarch/sched_cpucount.c
diff --git a/sysdeps/x86_64/multiarch/strcasestr-c.c b/sysdeps/x86/multiarch/strcasestr-c.c
similarity index 83%
rename from sysdeps/x86_64/multiarch/strcasestr-c.c
rename to sysdeps/x86/multiarch/strcasestr-c.c
index c13a4c4..43572f0 100644
--- a/sysdeps/x86_64/multiarch/strcasestr-c.c
+++ b/sysdeps/x86/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/multiarch/strcasestr-nonascii.c
similarity index 98%
rename from sysdeps/x86_64/multiarch/strcasestr-nonascii.c
rename to sysdeps/x86/multiarch/strcasestr-nonascii.c
index db84a43..f7edfd6 100644
--- a/sysdeps/x86_64/multiarch/strcasestr-nonascii.c
+++ b/sysdeps/x86/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/multiarch/strcasestr.c
similarity index 100%
rename from sysdeps/x86_64/multiarch/strcasestr.c
rename to sysdeps/x86/multiarch/strcasestr.c
diff --git a/sysdeps/x86_64/multiarch/strcspn-c.c b/sysdeps/x86/multiarch/strcspn-c.c
similarity index 98%
rename from sysdeps/x86_64/multiarch/strcspn-c.c
rename to sysdeps/x86/multiarch/strcspn-c.c
index 4513569..114b015 100644
--- a/sysdeps/x86_64/multiarch/strcspn-c.c
+++ b/sysdeps/x86/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/multiarch/strncat-c.c b/sysdeps/x86/multiarch/strncat-c.c
new file mode 100644
index 0000000..93cd82f
--- /dev/null
+++ b/sysdeps/x86/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/multiarch/strncpy-c.c b/sysdeps/x86/multiarch/strncpy-c.c
new file mode 100644
index 0000000..9fd3f4c
--- /dev/null
+++ b/sysdeps/x86/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/multiarch/strpbrk-c.c
similarity index 80%
rename from sysdeps/x86_64/multiarch/strpbrk-c.c
rename to sysdeps/x86/multiarch/strpbrk-c.c
index bbf5c49..6b689c0 100644
--- a/sysdeps/x86_64/multiarch/strpbrk-c.c
+++ b/sysdeps/x86/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/multiarch/strspn-c.c
similarity index 98%
rename from sysdeps/x86_64/multiarch/strspn-c.c
rename to sysdeps/x86/multiarch/strspn-c.c
index 4587839..37ad650 100644
--- a/sysdeps/x86_64/multiarch/strspn-c.c
+++ b/sysdeps/x86/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/multiarch/strstr-c.c
similarity index 87%
rename from sysdeps/x86_64/multiarch/strstr-c.c
rename to sysdeps/x86/multiarch/strstr-c.c
index bb1f8c9..4030ac8 100644
--- a/sysdeps/x86_64/multiarch/strstr-c.c
+++ b/sysdeps/x86/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/multiarch/strstr.c
similarity index 100%
rename from sysdeps/x86_64/multiarch/strstr.c
rename to sysdeps/x86/multiarch/strstr.c
diff --git a/sysdeps/x86_64/multiarch/test-multiarch.c b/sysdeps/x86/multiarch/test-multiarch.c
similarity index 100%
rename from sysdeps/x86_64/multiarch/test-multiarch.c
rename to sysdeps/x86/multiarch/test-multiarch.c
diff --git a/sysdeps/x86_64/multiarch/varshift.c b/sysdeps/x86/multiarch/varshift.c
similarity index 100%
rename from sysdeps/x86_64/multiarch/varshift.c
rename to sysdeps/x86/multiarch/varshift.c
diff --git a/sysdeps/x86_64/multiarch/varshift.h b/sysdeps/x86/multiarch/varshift.h
similarity index 100%
rename from sysdeps/x86_64/multiarch/varshift.h
rename to sysdeps/x86/multiarch/varshift.h
diff --git a/sysdeps/x86/multiarch/wcscpy-c.c b/sysdeps/x86/multiarch/wcscpy-c.c
new file mode 100644
index 0000000..c380188
--- /dev/null
+++ b/sysdeps/x86/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/multiarch/wmemcmp-c.c
similarity index 69%
rename from sysdeps/x86_64/multiarch/wmemcmp-c.c
rename to sysdeps/x86/multiarch/wmemcmp-c.c
index 1074238..90e1922 100644
--- a/sysdeps/x86_64/multiarch/wmemcmp-c.c
+++ b/sysdeps/x86/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..9f98fd1
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/Implies
@@ -0,0 +1 @@
+x86/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"

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


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]