summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-08-12 14:52:22 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-08-12 14:52:22 +0000
commitcba3f0341abb0918de10e8103cf5117fb26fa5ce (patch)
tree65b9e6b4283b0752cd8a54be4b87000e6db3dbe4
parent75f87234903fd01cbf0c0e87a2c564a2ef65efe6 (diff)
downloadgcc-cba3f0341abb0918de10e8103cf5117fb26fa5ce.tar.gz
Add Knights Landing support to __builtin_cpu_is
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226817 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/builtin_target.c4
-rw-r--r--libgcc/ChangeLog5
-rw-r--r--libgcc/config/i386/cpuinfo.c5
4 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index af43f4df552..4d053d2bf10 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/gcc.target/i386/builtin_target.c b/gcc/testsuite/gcc.target/i386/builtin_target.c
index 4adea27d595..068db23f9d9 100644
--- a/gcc/testsuite/gcc.target/i386/builtin_target.c
+++ b/gcc/testsuite/gcc.target/i386/builtin_target.c
@@ -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:
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 062bbe924dd..085dc0597ad 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -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
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
index 25d85e4bedd..b7b11de9865 100644
--- a/libgcc/config/i386/cpuinfo.c
+++ b/libgcc/config/i386/cpuinfo.c
@@ -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: