Support unknown Intel family 0x6 CPUs.
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 8 Jun 2011 13:48:58 +0000 (13:48 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 8 Jun 2011 13:48:58 +0000 (06:48 -0700)
2011-06-08  H.J. Lu  <hongjiu.lu@intel.com>

* config/i386/driver-i386.c (host_detect_local_cpu): Support
unknown Intel family 0x6 CPUs.

From-SVN: r174809

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

index 024f6b6b0d2688b6f1ee03b6cb1c4d81824f4da4..7f53eaf576c6d5f07b34cd11ee8466a46eadae51 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/i386/driver-i386.c (host_detect_local_cpu): Support
+       unknown Intel family 0x6 CPUs.
+
 2011-06-08  Martin Jambor  <mjambor@suse.cz>
 
        * tree-sra.c (mark_rw_status): Removed.
index 4fc6b451f68e81d732b203f8b5cb7538ebfffbaa..985a6ff5606e063cf603a8fb7928729e4a3be12b 100644 (file)
@@ -587,9 +587,22 @@ const char *host_detect_local_cpu (int argc, const char **argv)
        default:
          if (arch)
            {
-             if (has_ssse3)
-               /* If it is an unknown CPU with SSSE3, assume Core 2.  */
-               cpu = "core2";
+             /* This is unknown family 0x6 CPU.  */
+             if (has_avx)
+               /* Assume Sandy Bridge.  */
+               cpu = "corei7-avx";
+             else if (has_sse4_2)
+               /* Assume Core i7.  */
+               cpu = "corei7";
+             else if (has_ssse3)
+               {
+                 if (has_movbe)
+                   /* Assume Atom.  */
+                   cpu = "atom";
+                 else
+                   /* Assume Core 2.  */
+                   cpu = "core2";
+               }
              else if (has_sse3)
                /* It is Core Duo.  */
                cpu = "pentium-m";