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, master, updated. glibc-2.10-351-gb0f3a2e


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, master has been updated
       via  b0f3a2e43fb9de9a4a2f4dfbdb84b98994752bc4 (commit)
       via  9d6982d5d2520fa714ad5de6a9a178fdd8ece92d (commit)
      from  930799d555e9534cf78f57fa88642a4a43d278f4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

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

commit b0f3a2e43fb9de9a4a2f4dfbdb84b98994752bc4
Author: Roland McGrath <roland@redhat.com>
Date:   Tue Oct 6 20:01:23 2009 -0700

    Clean up unnecessary libc_hidden_builtin_def fiddling in x86 multiarch definitions.

diff --git a/ChangeLog b/ChangeLog
index ceba015..7192970 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2009-10-06  Roland McGrath  <roland@redhat.com>
 
+	* sysdeps/x86_64/multiarch/strstr-c.c
+	[! SHARED]: Omit libc_hidden_builtin_def fiddling.
+
+	* sysdeps/x86_64/multiarch/strcasestr-c.c: Remove
+	libc_hidden_builtin_def fiddling, does not apply to strcasestr at all.
+
 	* sysdeps/x86_64/multiarch/init-arch.h
 	[NOT_IN_libc] (__get_cpu_features): Define it as a macro.
 	(HAS_CPU_FEATURE): New macro.
diff --git a/sysdeps/x86_64/multiarch/strcasestr-c.c b/sysdeps/x86_64/multiarch/strcasestr-c.c
index 3cb5557..551492d 100644
--- a/sysdeps/x86_64/multiarch/strcasestr-c.c
+++ b/sysdeps/x86_64/multiarch/strcasestr-c.c
@@ -1,9 +1,6 @@
 #include "init-arch.h"
 
 #define STRCASESTR __strcasestr_sse2
-#undef libc_hidden_builtin_def
-#define libc_hidden_builtin_def(name) \
-  __hidden_ver1 (__strcasestr_sse2, __GI_strcasestr, __strcasestr_sse2);
 
 #include "string/strcasestr.c"
 
diff --git a/sysdeps/x86_64/multiarch/strstr-c.c b/sysdeps/x86_64/multiarch/strstr-c.c
index d593089..b8ed316 100644
--- a/sysdeps/x86_64/multiarch/strstr-c.c
+++ b/sysdeps/x86_64/multiarch/strstr-c.c
@@ -1,9 +1,11 @@
 #include "init-arch.h"
 
 #define STRSTR __strstr_sse2
-#undef libc_hidden_builtin_def
-#define libc_hidden_builtin_def(name) \
+#ifdef SHARED
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name) \
   __hidden_ver1 (__strstr_sse2, __GI_strstr, __strstr_sse2);
+#endif
 
 #include "string/strstr.c"
 

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

commit 9d6982d5d2520fa714ad5de6a9a178fdd8ece92d
Author: Roland McGrath <roland@redhat.com>
Date:   Tue Oct 6 19:59:03 2009 -0700

    Clean up x86 multiarch HAS_FOO macros.

diff --git a/ChangeLog b/ChangeLog
index 8083b80..ceba015 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-10-06  Roland McGrath  <roland@redhat.com>
+
+	* sysdeps/x86_64/multiarch/init-arch.h
+	[NOT_IN_libc] (__get_cpu_features): Define it as a macro.
+	(HAS_CPU_FEATURE): New macro.
+	(HAS_SSE2, HAS_POPCOUNT, HAS_SSE4_2, HAS_FMA): Use it.
+	* sysdeps/x86_64/multiarch/init-arch.c
+	(__get_cpu_features): #undef it before definition.
+
 2009-10-05  Andreas Schwab  <schwab@redhat.com>
 
 	* locale/C-time.c: Revert week-1stday back to 19971130 and set
diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c
index 9a1e776..7823ace 100644
--- a/sysdeps/x86_64/multiarch/init-arch.c
+++ b/sysdeps/x86_64/multiarch/init-arch.c
@@ -77,6 +77,7 @@ __init_cpu_features (void)
     __cpu_features.kind = arch_kind_other;
 }
 
+#undef __get_cpu_features
 
 const struct cpu_features *
 __get_cpu_features (void)
diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h
index 8d9b1e8..9b12831 100644
--- a/sysdeps/x86_64/multiarch/init-arch.h
+++ b/sysdeps/x86_64/multiarch/init-arch.h
@@ -58,30 +58,16 @@ extern void __init_cpu_features (void) attribute_hidden;
 extern const struct cpu_features *__get_cpu_features (void)
      __attribute__ ((const));
 
-/* Following are the feature tests used throughout libc.  */
-
 #ifndef NOT_IN_libc
-# define HAS_SSE2 \
-  ((__cpu_features.cpuid[COMMON_CPUID_INDEX_1].edx & (1 << 26)) != 0)
-
-# define HAS_POPCOUNT \
-  ((__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & (1 << 23)) != 0)
-
-# define HAS_SSE4_2 \
-  ((__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & (1 << 20)) != 0)
-
-# define HAS_FMA \
-  ((__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & (1 << 12)) != 0)
-#else
-# define HAS_SSE2 \
-  ((__get_cpu_features ()->cpuid[COMMON_CPUID_INDEX_1].edx & (1 << 26)) != 0)
+# define __get_cpu_features()	(&__cpu_features)
+#endif
 
-# define HAS_POPCOUNT \
-  ((__get_cpu_features ()->cpuid[COMMON_CPUID_INDEX_1].ecx & (1 << 23)) != 0)
+#define HAS_CPU_FEATURE(idx, reg, bit) \
+  ((__get_cpu_features ()->cpuid[idx].reg & (1 << (bit))) != 0)
 
-# define HAS_SSE4_2 \
-  ((__get_cpu_features ()->cpuid[COMMON_CPUID_INDEX_1].ecx & (1 << 20)) != 0)
+/* Following are the feature tests used throughout libc.  */
 
-# define HAS_FMA \
-  ((__get_cpu_features ()->cpuid[COMMON_CPUID_INDEX_1].ecx & (1 << 12)) != 0)
-#endif
+#define HAS_SSE2	HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, edx, 26)
+#define HAS_POPCOUNT	HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 23)
+#define HAS_SSE4_2	HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 20)
+#define HAS_FMA		HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 12)

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

Summary of changes:
 ChangeLog                               |   15 ++++++++++++++
 sysdeps/x86_64/multiarch/init-arch.c    |    1 +
 sysdeps/x86_64/multiarch/init-arch.h    |   32 ++++++++----------------------
 sysdeps/x86_64/multiarch/strcasestr-c.c |    3 --
 sysdeps/x86_64/multiarch/strstr-c.c     |    6 +++-
 5 files changed, 29 insertions(+), 28 deletions(-)


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]