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.22-62-ga5cf909


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  a5cf909b8f25f8240eabc5f1ff96b4be0472d8e1 (commit)
      from  e54388bd8be2828b8b7a207e9c5a10049ad3bb79 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a5cf909b8f25f8240eabc5f1ff96b4be0472d8e1

commit a5cf909b8f25f8240eabc5f1ff96b4be0472d8e1
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Aug 13 04:52:50 2015 -0700

    Check if cpuid is available in init_cpu_features
    
    Since not all i486 processors support cpuid, we call __get_cpuid_max to
    check if cpuid is available before using it if not compiling for i586,
    i686 nor x86-64.
    
    	* sysdeps/x86/cpu-features.c (init_cpu_features): Call
    	__get_cpuid_max if not compiling for i586, i686 nor x86-64.

diff --git a/ChangeLog b/ChangeLog
index 51c6fef..3f55c55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-08-13  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/x86/cpu-features.c (init_cpu_features): Call
+	__get_cpuid_max if not compiling for i586, i686 nor x86-64.
+
+2015-08-13  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* sysdeps/unix/sysv/linux/x86/elision-conf.h: Don't include
 	<cpuid.h>.
 
diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
index 587080c..582a8f5 100644
--- a/sysdeps/x86/cpu-features.c
+++ b/sysdeps/x86/cpu-features.c
@@ -40,6 +40,14 @@ init_cpu_features (struct cpu_features *cpu_features)
   unsigned int model = 0;
   enum cpu_features_kind kind;
 
+#if !defined __i586__ && !defined __i686__ && !defined __x86_64__
+  if (__get_cpuid_max (0, 0) == 0)
+    {
+      kind = arch_kind_other;
+      goto no_cpuid;
+    }
+#endif
+
   __cpuid (0, cpu_features->max_cpuid, ebx, ecx, edx);
 
   /* This spells out "GenuineIntel".  */
@@ -196,6 +204,10 @@ init_cpu_features (struct cpu_features *cpu_features)
 	}
     }
 
+#if !defined __i586__ && !defined __i686__ && !defined __x86_64__
+no_cpuid:
+#endif
+
   cpu_features->family = family;
   cpu_features->model = model;
   cpu_features->kind = kind;

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

Summary of changes:
 ChangeLog                  |    5 +++++
 sysdeps/x86/cpu-features.c |   12 ++++++++++++
 2 files changed, 17 insertions(+), 0 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]