Compute extend family info for AMD CPU and update for BTVER2
authorGanesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>
Mon, 4 Aug 2014 09:27:31 +0000 (09:27 +0000)
committerGanesh Gopalasubramanian <gganesh@gcc.gnu.org>
Mon, 4 Aug 2014 09:27:31 +0000 (09:27 +0000)
From-SVN: r213544

gcc/ChangeLog
gcc/config/i386/driver-i386.c

index 67957ea..2be35a9 100644 (file)
@@ -1,3 +1,8 @@
+2014-08-04 Ganesh Gopalasubramanian  <Ganesh.Gopalasubramanian@amd.com>
+
+       * config/i386/driver-i386.c (host_detect_local_cpu): Handle AMD's extended
+       family information. Handle BTVER2 cpu with cpuid family value.
+
 2014-08-04  Tom de Vries  <tom@codesourcery.com>
 
        * doc/sourcebuild.texi (glibc, glibc_2_12_or_later)
index 1c6385f..f82fd0b 100644 (file)
@@ -432,7 +432,8 @@ const char *host_detect_local_cpu (int argc, const char **argv)
 
   model = (eax >> 4) & 0x0f;
   family = (eax >> 8) & 0x0f;
-  if (vendor == signature_INTEL_ebx)
+  if (vendor == signature_INTEL_ebx
+      || vendor == signature_AMD_ebx)
     {
       unsigned int extended_model, extended_family;
 
@@ -576,7 +577,7 @@ const char *host_detect_local_cpu (int argc, const char **argv)
 
       if (name == signature_NSC_ebx)
        processor = PROCESSOR_GEODE;
-      else if (has_movbe)
+      else if (has_movbe && family == 22)
        processor = PROCESSOR_BTVER2;
       else if (has_avx2)
         processor = PROCESSOR_BDVER4;