Add Knights Landing support to __builtin_cpu_is
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 12 Aug 2015 14:52:22 +0000 (14:52 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 12 Aug 2015 14:52:22 +0000 (07:52 -0700)
This patch adds Knights Landing support to __builtin_cpu_is.

gcc/testsuite/

* gcc.target/i386/builtin_target.c (check_intel_cpu_model):
Check Knights Landing support.

libgcc/

* config/i386/cpuinfo.c (processor_types): Add INTEL_KNL.
(get_intel_cpu): Add Knights Landing support.

From-SVN: r226817

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/builtin_target.c
libgcc/ChangeLog
libgcc/config/i386/cpuinfo.c

index af43f4df552317a699229cf07c986de454373bf3..4d053d2bf10fd45ed6c4875e2202d329781da8a4 100644 (file)
@@ -1,3 +1,8 @@
+2015-08-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * gcc.target/i386/builtin_target.c (check_intel_cpu_model):
+       Check Knights Landing support.
+
 2015-08-12  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/47461
index 4adea27d595019243d7e7564aec9261b27610c2b..068db23f9d95d230e9099df69ceb4a4f53df81cd 100644 (file)
@@ -38,6 +38,10 @@ check_intel_cpu_model (unsigned int family, unsigned int model,
              /* Silvermont.  */
              assert (__builtin_cpu_is ("silvermont"));
              break;
+           case 0x57:
+             /* Knights Landing.  */
+             assert (__builtin_cpu_is ("knl"));
+             break;
            case 0x1a:
            case 0x1e:
            case 0x1f:
index 062bbe924dd0b2f5f55f916d240b0037babc6d4f..085dc0597adf422e50baf9d7bcf1347f098ee8eb 100644 (file)
@@ -1,3 +1,8 @@
+2015-08-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/i386/cpuinfo.c (processor_types): Add INTEL_KNL.
+       (get_intel_cpu): Add Knights Landing support.
+
 2015-08-11  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/66954
index 25d85e4bedd7542353b2480c0636d92e2464dec0..b7b11de9865cba6b61c879647441b8431fe00d99 100644 (file)
@@ -56,6 +56,7 @@ enum processor_types
   AMDFAM10H,
   AMDFAM15H,
   INTEL_SILVERMONT,
+  INTEL_KNL,
   AMD_BTVER1,
   AMD_BTVER2,  
   CPU_TYPE_MAX
@@ -197,6 +198,10 @@ get_intel_cpu (unsigned int family, unsigned int model, unsigned int brand_id)
              /* Silvermont.  */
              __cpu_model.__cpu_type = INTEL_SILVERMONT;
              break;
+           case 0x57:
+             /* Knights Landing.  */
+             __cpu_model.__cpu_type = INTEL_KNL;
+             break;
            case 0x1a:
            case 0x1e:
            case 0x1f: