public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 1/2] i386: Consider Kaby Lake to be equivalent to Skylake
@ 2017-06-16 21:43 Matt Turner
  2017-06-16 21:43 ` [PATCH 2/2] i386: Assume Skylake for unknown models with clflushopt Matt Turner
  2017-06-18 17:56 ` [PATCH 1/2] i386: Consider Kaby Lake to be equivalent to Skylake Uros Bizjak
  0 siblings, 2 replies; 5+ messages in thread
From: Matt Turner @ 2017-06-16 21:43 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jan Hubicka, Uros Bizjak, H . J . Lu, Matt Turner

Currently -march=native selects -march=broadwell on Kaby Lake systems,
since its model numbers are missing from the switch statement. It falls
back to the default case and chooses -march=broadwell because of the
presence of the ADX instruction set.

gcc/
	* config/i386/driver-i386.c (host_detect_local_cpu): Add Kaby
	Lake models to skylake case.

gcc/testsuite/

	* gcc.target/i386/builtin_target.c: Add Kaby Lake models to
	skylake check.

libgcc/

	* config/i386/cpuinfo.c (get_intel_cpu): Add Kaby Lake models to
	skylake case.
---
 gcc/config/i386/driver-i386.c                  | 3 +++
 gcc/testsuite/gcc.target/i386/builtin_target.c | 3 +++
 libgcc/config/i386/cpuinfo.c                   | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c
index 6c812514239..09faad0af0e 100644
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -781,6 +781,9 @@ const char *host_detect_local_cpu (int argc, const char **argv)
 	case 0x4e:
 	case 0x5e:
 	  /* Skylake.  */
+	case 0x8e:
+	case 0x9e:
+	  /* Kaby Lake.  */
 	  cpu = "skylake";
 	  break;
 	case 0x57:
diff --git a/gcc/testsuite/gcc.target/i386/builtin_target.c b/gcc/testsuite/gcc.target/i386/builtin_target.c
index 374f0292453..9c190eb7ebc 100644
--- a/gcc/testsuite/gcc.target/i386/builtin_target.c
+++ b/gcc/testsuite/gcc.target/i386/builtin_target.c
@@ -88,6 +88,9 @@ check_intel_cpu_model (unsigned int family, unsigned int model,
 	    case 0x4e:
 	    case 0x5e:
 	      /* Skylake.  */
+	    case 0x8e:
+	    case 0x9e:
+	      /* Kaby Lake.  */
 	      assert (__builtin_cpu_is ("corei7"));
 	      assert (__builtin_cpu_is ("skylake"));
 	      break;
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
index a1dc011525f..b008fb6e396 100644
--- a/libgcc/config/i386/cpuinfo.c
+++ b/libgcc/config/i386/cpuinfo.c
@@ -183,6 +183,9 @@ get_intel_cpu (unsigned int family, unsigned int model, unsigned int brand_id)
 	    case 0x4e:
 	    case 0x5e:
 	      /* Skylake.  */
+	    case 0x8e:
+	    case 0x9e:
+	      /* Kaby Lake.  */
 	      __cpu_model.__cpu_type = INTEL_COREI7;
 	      __cpu_model.__cpu_subtype = INTEL_COREI7_SKYLAKE;
 	      break;
-- 
2.13.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-22 17:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-16 21:43 [PATCH 1/2] i386: Consider Kaby Lake to be equivalent to Skylake Matt Turner
2017-06-16 21:43 ` [PATCH 2/2] i386: Assume Skylake for unknown models with clflushopt Matt Turner
2017-06-18 17:57   ` Uros Bizjak
2017-06-18 17:56 ` [PATCH 1/2] i386: Consider Kaby Lake to be equivalent to Skylake Uros Bizjak
2017-06-22 17:34   ` Matt Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).