[1/2] Initial Raptorlake Support

Message ID 20221014074058.7709-2-haochen.jiang@intel.com
State Accepted
Headers
Series Add new Intel Architecture |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Jiang, Haochen Oct. 14, 2022, 7:40 a.m. UTC
  gcc/ChangeLog:

	* common/config/i386/cpuinfo.h:
	(get_intel_cpu): Handle Raptorlake.
	* common/config/i386/i386-common.cc:
	(processor_alias_table): Add Raptorlake.
---
 gcc/common/config/i386/cpuinfo.h      | 2 ++
 gcc/common/config/i386/i386-common.cc | 2 ++
 2 files changed, 4 insertions(+)
  

Comments

Hongtao Liu Oct. 17, 2022, 1:13 a.m. UTC | #1
On Fri, Oct 14, 2022 at 3:41 PM Haochen Jiang via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> gcc/ChangeLog:
>
>         * common/config/i386/cpuinfo.h:
>         (get_intel_cpu): Handle Raptorlake.
>         * common/config/i386/i386-common.cc:
>         (processor_alias_table): Add Raptorlake.
Ok.
> ---
>  gcc/common/config/i386/cpuinfo.h      | 2 ++
>  gcc/common/config/i386/i386-common.cc | 2 ++
>  2 files changed, 4 insertions(+)
>
> diff --git a/gcc/common/config/i386/cpuinfo.h b/gcc/common/config/i386/cpuinfo.h
> index bbced8a23b9..e759e6f89fa 100644
> --- a/gcc/common/config/i386/cpuinfo.h
> +++ b/gcc/common/config/i386/cpuinfo.h
> @@ -496,6 +496,8 @@ get_intel_cpu (struct __processor_model *cpu_model,
>      case 0x9a:
>      case 0xbf:
>        /* Alder Lake.  */
> +    case 0xb7:
> +      /* Raptor Lake.  */
>        cpu = "alderlake";
>        CHECK___builtin_cpu_is ("corei7");
>        CHECK___builtin_cpu_is ("alderlake");
> diff --git a/gcc/common/config/i386/i386-common.cc b/gcc/common/config/i386/i386-common.cc
> index c0c2ad74d87..8d346245ddd 100644
> --- a/gcc/common/config/i386/i386-common.cc
> +++ b/gcc/common/config/i386/i386-common.cc
> @@ -1929,6 +1929,8 @@ const pta processor_alias_table[] =
>      M_CPU_SUBTYPE (INTEL_COREI7_SAPPHIRERAPIDS), P_PROC_AVX512F},
>    {"alderlake", PROCESSOR_ALDERLAKE, CPU_HASWELL, PTA_ALDERLAKE,
>      M_CPU_SUBTYPE (INTEL_COREI7_ALDERLAKE), P_PROC_AVX2},
> +  {"raptorlake", PROCESSOR_ALDERLAKE, CPU_HASWELL, PTA_ALDERLAKE,
> +    M_CPU_SUBTYPE (INTEL_COREI7_ALDERLAKE), P_PROC_AVX2},
>    {"bonnell", PROCESSOR_BONNELL, CPU_ATOM, PTA_BONNELL,
>      M_CPU_TYPE (INTEL_BONNELL), P_PROC_SSSE3},
>    {"atom", PROCESSOR_BONNELL, CPU_ATOM, PTA_BONNELL,
> --
> 2.18.1
>
  

Patch

diff --git a/gcc/common/config/i386/cpuinfo.h b/gcc/common/config/i386/cpuinfo.h
index bbced8a23b9..e759e6f89fa 100644
--- a/gcc/common/config/i386/cpuinfo.h
+++ b/gcc/common/config/i386/cpuinfo.h
@@ -496,6 +496,8 @@  get_intel_cpu (struct __processor_model *cpu_model,
     case 0x9a:
     case 0xbf:
       /* Alder Lake.  */
+    case 0xb7:
+      /* Raptor Lake.  */
       cpu = "alderlake";
       CHECK___builtin_cpu_is ("corei7");
       CHECK___builtin_cpu_is ("alderlake");
diff --git a/gcc/common/config/i386/i386-common.cc b/gcc/common/config/i386/i386-common.cc
index c0c2ad74d87..8d346245ddd 100644
--- a/gcc/common/config/i386/i386-common.cc
+++ b/gcc/common/config/i386/i386-common.cc
@@ -1929,6 +1929,8 @@  const pta processor_alias_table[] =
     M_CPU_SUBTYPE (INTEL_COREI7_SAPPHIRERAPIDS), P_PROC_AVX512F},
   {"alderlake", PROCESSOR_ALDERLAKE, CPU_HASWELL, PTA_ALDERLAKE,
     M_CPU_SUBTYPE (INTEL_COREI7_ALDERLAKE), P_PROC_AVX2},
+  {"raptorlake", PROCESSOR_ALDERLAKE, CPU_HASWELL, PTA_ALDERLAKE,
+    M_CPU_SUBTYPE (INTEL_COREI7_ALDERLAKE), P_PROC_AVX2},
   {"bonnell", PROCESSOR_BONNELL, CPU_ATOM, PTA_BONNELL,
     M_CPU_TYPE (INTEL_BONNELL), P_PROC_SSSE3},
   {"atom", PROCESSOR_BONNELL, CPU_ATOM, PTA_BONNELL,