This is the mail archive of the libc-alpha@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]

PATCH: Properly check CPU family and model.


Hi,

This commit:

http://sourceware.org/git/?p=glibc.git;a=commit;h=22f4f44b6727887957aa1d4039eba290b064da63

breaks CPU family and model check.  This patch fixes it.


H.J.
--
2010-05-26  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features):
	Properly check family and model.

diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c
index efb89b6..f13a9f4 100644
--- a/sysdeps/x86_64/multiarch/init-arch.c
+++ b/sysdeps/x86_64/multiarch/init-arch.c
@@ -62,15 +62,15 @@ __init_cpu_features (void)
       unsigned int eax = __cpu_features.cpuid[COMMON_CPUID_INDEX_1].eax;
       unsigned int extended_family = (eax >> 20) & 0xff;
       unsigned int extended_model = (eax >> 12) & 0xf0;
-      if (__cpu_features.family == 0x0f)
+      if (family == 0x0f)
 	{
 	  family += extended_family;
 	  model += extended_model;
 	}
-      else if (__cpu_features.family == 0x06)
+      else if (family == 0x06)
 	{
 	  model += extended_model;
-	  switch (__cpu_features.model)
+	  switch (model)
 	    {
 	    case 0x1a:
 	    case 0x1e:


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