On Tue, Nov 10, 2020 at 4:17 PM Hongtao Liu <crazy...@gmail.com> wrote: > > On Tue, Nov 10, 2020 at 3:22 AM Jason Merrill via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: > > > > This patch was also applied to the GCC 9 and 10 branches and breaks those > > builds, because PTA_CLDEMOTE is not defined. > > > Mine, let me fix it, sorry for that. >
Since CLDEMOTE already existed in gcc9 and later, define PTA_CLDEMOTE instead of removing it. Similar for MOVDIRI, MOVDIR64B. GCC10-Fix.patch gcc/ChangeLog * config/i386/i386-options.c (ix86_option_override_internal): Handle PTA_CLDEMOTE. * config/i386/i386.h (PTA_CLDEMOTE): Define. GCC9-Fix.patch gcc/ChangeLog * config/i386/i386.c (ix86_option_override_internal): Handle PTA_CLDEMOTE, PTA_MOVDIRI, PTA_MOVDIR64B. * config/i386/i386.h (PTA_CLDEMOTE, PTA_MOVDIRI, PTA_MOVDIR64B.): Define. Bootstrap and regression test for i386 backend is ok on releases/gcc-9 and releases/gcc-10 branch. Sorry for such unnecessary inconvenience. > -- > BR, > Hongtao -- BR, Hongtao
From 7744c0f741e26123e63a90494efd4a6c989df7c6 Mon Sep 17 00:00:00 2001 From: liuhongt <hongtao....@intel.com> Date: Tue, 10 Nov 2020 16:42:06 +0800 Subject: [PATCH] Fix missing defination of PTA_CLDEMOTE. gcc/ChangeLog * config/i386/i386-options.c (ix86_option_override_internal): Handle PTA_CLDEMOTE. * config/i386/i386.h (PTA_CLDEMOTE): Define. --- gcc/config/i386/i386-options.c | 3 +++ gcc/config/i386/i386.h | 1 + 2 files changed, 4 insertions(+) diff --git a/gcc/config/i386/i386-options.c b/gcc/config/i386/i386-options.c index 5c21fce06a4..14a57a17156 100644 --- a/gcc/config/i386/i386-options.c +++ b/gcc/config/i386/i386-options.c @@ -2226,6 +2226,9 @@ ix86_option_override_internal (bool main_args_p, if (((processor_alias_table[i].flags & PTA_PTWRITE) != 0) && !(opts->x_ix86_isa_flags2_explicit & OPTION_MASK_ISA2_PTWRITE)) opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_PTWRITE; + if (((processor_alias_table[i].flags & PTA_CLDEMOTE) != 0) + && !(opts->x_ix86_isa_flags2_explicit & OPTION_MASK_ISA2_CLDEMOTE)) + opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_CLDEMOTE; if ((processor_alias_table[i].flags & (PTA_PREFETCH_SSE | PTA_SSE)) != 0) diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index d75a86bb8da..08f265fc8e0 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2437,6 +2437,7 @@ const wide_int_bitmask PTA_AVX512BF16 (0, HOST_WIDE_INT_1U << 11); const wide_int_bitmask PTA_WAITPKG (0, HOST_WIDE_INT_1U << 12); const wide_int_bitmask PTA_MOVDIRI(0, HOST_WIDE_INT_1U << 13); const wide_int_bitmask PTA_MOVDIR64B(0, HOST_WIDE_INT_1U << 14); +const wide_int_bitmask PTA_CLDEMOTE(0, HOST_WIDE_INT_1U << 16); const wide_int_bitmask PTA_CORE2 = PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_SSSE3 | PTA_CX16 | PTA_FXSR; -- 2.18.1
From a1b774edeedadf69c56529fa52a9e2ef92cb7957 Mon Sep 17 00:00:00 2001 From: liuhongt <hongtao....@intel.com> Date: Tue, 10 Nov 2020 16:48:08 +0800 Subject: [PATCH] Fix missing defination of PTA_CLDEMOTE, PTA_MOVDIRI, PTA_MOVDIR64B. gcc/ChangeLog * config/i386/i386.c (ix86_option_override_internal): Handle PTA_CLDEMOTE, PTA_MOVDIRI, PTA_MOVDIR64B. * config/i386/i386.h (PTA_CLDEMOTE, PTA_MOVDIRI, PTA_MOVDIR64B.): Define. --- gcc/config/i386/i386.c | 9 +++++++++ gcc/config/i386/i386.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index f968d033972..bd61be61fdf 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4058,6 +4058,15 @@ ix86_option_override_internal (bool main_args_p, if (((processor_alias_table[i].flags & PTA_PTWRITE) != 0) && !(opts->x_ix86_isa_flags2_explicit & OPTION_MASK_ISA_PTWRITE)) opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA_PTWRITE; + if (((processor_alias_table[i].flags & PTA_MOVDIRI) != 0) + && !(opts->x_ix86_isa_flags_explicit & OPTION_MASK_ISA_MOVDIRI)) + opts->x_ix86_isa_flags |= OPTION_MASK_ISA_MOVDIRI; + if (((processor_alias_table[i].flags & PTA_MOVDIR64B) != 0) + && !(opts->x_ix86_isa_flags2_explicit & OPTION_MASK_ISA_MOVDIR64B)) + opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA_MOVDIR64B; + if (((processor_alias_table[i].flags & PTA_CLDEMOTE) != 0) + && !(opts->x_ix86_isa_flags2_explicit & OPTION_MASK_ISA_CLDEMOTE)) + opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA_CLDEMOTE; if ((processor_alias_table[i].flags & (PTA_PREFETCH_SSE | PTA_SSE)) != 0) diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 17d6218e991..1cc9e3d9463 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2379,6 +2379,9 @@ const wide_int_bitmask PTA_PCONFIG (0, HOST_WIDE_INT_1U << 7); const wide_int_bitmask PTA_WBNOINVD (0, HOST_WIDE_INT_1U << 8); const wide_int_bitmask PTA_WAITPKG (0, HOST_WIDE_INT_1U << 9); const wide_int_bitmask PTA_PTWRITE (0, HOST_WIDE_INT_1U << 10); +const wide_int_bitmask PTA_MOVDIRI(0, HOST_WIDE_INT_1U << 13); +const wide_int_bitmask PTA_MOVDIR64B(0, HOST_WIDE_INT_1U << 14); +const wide_int_bitmask PTA_CLDEMOTE (0, HOST_WIDE_INT_1U << 16); const wide_int_bitmask PTA_CORE2 = PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_SSSE3 | PTA_CX16 | PTA_FXSR; -- 2.18.1