From 7cab07f0891dec03f64ae4be225f7dd5ea4c70ee Mon Sep 17 00:00:00 2001 From: Wei Xiao Date: Thu, 13 Dec 2018 08:57:28 +0000 Subject: [PATCH] i386-common.c (processor_names): Add cascadelake. gcc/ * common/config/i386/i386-common.c (processor_names): Add cascadelake. (processor_alias_table): Add cascadelake. * config.gcc: Add -march=cascadelake. * config/i386/i386-c.c (ix86_target_macros_internal): Handle cascadelake. * config/i386/i386.c (Add m_CASCADELAKE): New. (processor_cost_table): Add cascadelake. (get_builtin_code_for_version): Handle cascadelake. * config/i386/i386.h (TARGET_CASCADELAKE, PROCESSOR_CASCADELAKE): New. (PTA_CASCADELAKE): Ditto. * doc/invoke.texi: Add -march=cascadelake. gcc/testsuite/ * gcc.target/i386/funcspec-56.inc: Handle new march. From-SVN: r267080 --- gcc/ChangeLog | 18 ++++++++++++++++-- gcc/common/config/i386/i386-common.c | 3 +++ gcc/config.gcc | 2 +- gcc/config/i386/i386-c.c | 7 +++++++ gcc/config/i386/i386.c | 8 +++++++- gcc/config/i386/i386.h | 3 +++ gcc/doc/invoke.texi | 6 ++++++ gcc/testsuite/ChangeLog | 6 +++++- gcc/testsuite/gcc.target/i386/funcspec-56.inc | 1 + 9 files changed, 49 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a88ec326953..0e1cd58fcf9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2018-12-13 Wei Xiao + + * common/config/i386/i386-common.c (processor_names): Add cascadelake. + (processor_alias_table): Add cascadelake. + * config.gcc: Add -march=cascadelake. + * config/i386/i386-c.c (ix86_target_macros_internal): Handle + cascadelake. + * config/i386/i386.c (Add m_CASCADELAKE): New. + (processor_cost_table): Add cascadelake. + (get_builtin_code_for_version): Handle cascadelake. + * config/i386/i386.h (TARGET_CASCADELAKE, PROCESSOR_CASCADELAKE): New. + (PTA_CASCADELAKE): Ditto. + * doc/invoke.texi: Add -march=cascadelake. + 2018-12-13 Jakub Jelinek PR target/88465 @@ -3553,7 +3567,7 @@ * vr-values.c (vr_values::extract_range_from_comparison): Clear equiv for constant singleton ranges. -2018-11-12 Wei Xiao +2018-11-12 Wei Xiao * config/i386/sse.md: Combine VFIXUPIMM* patterns (_fixupimm_maskz): Update. @@ -4804,7 +4818,7 @@ (pass_inc_dec::execute): Allocate and release reg_next_debug_use. -2018-11-06 Wei Xiao +2018-11-06 Wei Xiao * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics. (_mm512_fixupimm_round_pd): Update parameters and builtin. diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c index 4238b432431..f7a1feae074 100644 --- a/gcc/common/config/i386/i386-common.c +++ b/gcc/common/config/i386/i386-common.c @@ -1504,6 +1504,7 @@ const char *const processor_names[] = "cannonlake", "icelake-client", "icelake-server", + "cascadelake", "intel", "geode", "k6", @@ -1584,6 +1585,8 @@ const pta processor_alias_table[] = PTA_ICELAKE_CLIENT}, {"icelake-server", PROCESSOR_ICELAKE_SERVER, CPU_HASWELL, PTA_ICELAKE_SERVER}, + {"cascadelake", PROCESSOR_CASCADELAKE, CPU_HASWELL, + PTA_CASCADELAKE}, {"bonnell", PROCESSOR_BONNELL, CPU_ATOM, PTA_BONNELL}, {"atom", PROCESSOR_BONNELL, CPU_ATOM, PTA_BONNELL}, {"silvermont", PROCESSOR_SILVERMONT, CPU_SLM, PTA_SILVERMONT}, diff --git a/gcc/config.gcc b/gcc/config.gcc index 47b2917b23e..3122a0ce2ae 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -662,7 +662,7 @@ bdver3 bdver4 znver1 znver2 btver1 btver2 k8 k8-sse3 opteron \ opteron-sse3 nocona core2 corei7 corei7-avx core-avx-i core-avx2 atom \ slm nehalem westmere sandybridge ivybridge haswell broadwell bonnell \ silvermont knl knm skylake-avx512 cannonlake icelake-client icelake-server \ -skylake goldmont goldmont-plus tremont x86-64 native" +skylake goldmont goldmont-plus tremont cascadelake x86-64 native" # Additional x86 processors supported by --with-cpu=. Each processor # MUST be separated by exactly one space. diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c index 16c6a2d5503..5c327dc93e9 100644 --- a/gcc/config/i386/i386-c.c +++ b/gcc/config/i386/i386-c.c @@ -218,6 +218,10 @@ ix86_target_macros_internal (HOST_WIDE_INT isa_flag, def_or_undef (parse_in, "__icelake_server"); def_or_undef (parse_in, "__icelake_server__"); break; + case PROCESSOR_CASCADELAKE: + def_or_undef (parse_in, "__cascadelake"); + def_or_undef (parse_in, "__cascadelake__"); + break; /* use PROCESSOR_max to not set/unset the arch macro. */ case PROCESSOR_max: break; @@ -363,6 +367,9 @@ ix86_target_macros_internal (HOST_WIDE_INT isa_flag, case PROCESSOR_LAKEMONT: def_or_undef (parse_in, "__tune_lakemont__"); break; + case PROCESSOR_CASCADELAKE: + def_or_undef (parse_in, "__tune_cascadelake__"); + break; case PROCESSOR_INTEL: case PROCESSOR_GENERIC: break; diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e86c39e70b3..caa701fe242 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -148,8 +148,9 @@ const struct processor_costs *ix86_cost = NULL; #define m_CANNONLAKE (HOST_WIDE_INT_1U< + + * gcc.target/i386/funcspec-56.inc: Handle new march. + 2018-12-13 Jakub Jelinek PR target/88465 @@ -2582,7 +2586,7 @@ * gcc.target/i386/pr18041-1.c: New testcase. * gcc.target/i386/pr18041-2.c: Likewise. -2018-11-06 Wei Xiao +2018-11-06 Wei Xiao * gcc.target/i386/avx-1.c: Update tests for VFIXUPIMM* intrinsics. * gcc.target/i386/avx512f-vfixupimmpd-1.c: Ditto. diff --git a/gcc/testsuite/gcc.target/i386/funcspec-56.inc b/gcc/testsuite/gcc.target/i386/funcspec-56.inc index 437b12fc67d..0eb83a7fd30 100644 --- a/gcc/testsuite/gcc.target/i386/funcspec-56.inc +++ b/gcc/testsuite/gcc.target/i386/funcspec-56.inc @@ -150,6 +150,7 @@ extern void test_arch_skylake_avx512 (void) __attribute__((__target__("arch=skyl extern void test_arch_cannonlake (void) __attribute__((__target__("arch=cannonlake"))); extern void test_arch_icelake_client (void) __attribute__((__target__("arch=icelake-client"))); extern void test_arch_icelake_server (void) __attribute__((__target__("arch=icelake-server"))); +extern void test_arch_cascadelake (void) __attribute__((__target__("arch=cascadelake"))); extern void test_arch_k8 (void) __attribute__((__target__("arch=k8"))); extern void test_arch_k8_sse3 (void) __attribute__((__target__("arch=k8-sse3"))); extern void test_arch_opteron (void) __attribute__((__target__("arch=opteron"))); -- 2.30.2