[PATCH] cpuid check code in libgcc, fix cpuinfo code for sandybridge detection

Sriraman Tallam tmsriram@google.com
Fri Mar 8 01:06:00 GMT 2013


Hi,

   I committed this simple patch to check for sandybridge processors
when cpuid model number is 0x2d. This is the model for SandyBridge-E
processors : http://software.intel.com/en-us/articles/intel-architecture-and-processor-identification-with-cpuid-model-and-family-numbers


Index: config/i386/cpuinfo.c
===================================================================
--- config/i386/cpuinfo.c (revision 196527)
+++ config/i386/cpuinfo.c (working copy)
@@ -178,6 +178,7 @@ get_intel_cpu (unsigned int family, unsigned int m
       __cpu_model.__cpu_subtype = INTEL_COREI7_WESTMERE;
       break;
     case 0x2a:
+    case 0x2d:
       /* Sandy Bridge.  */
       __cpu_model.__cpu_type = INTEL_COREI7;
       __cpu_model.__cpu_subtype = INTEL_COREI7_SANDYBRIDGE;


Thanks
Sri



More information about the Gcc-patches mailing list