From 8f93810d3b7cc7540e31397697f5df9db18daba4 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 4 Sep 2018 19:49:57 +0200 Subject: [PATCH] re PR target/87198 (ICE in extract_insn, at recog.c:2304) PR target/87198 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET, OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE. (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET and OPTION_MASK_ISA_XSAVEC_UNSET. * gcc.target/i386/pr87198.c: New test. From-SVN: r264088 --- gcc/ChangeLog | 9 +++++++++ gcc/common/config/i386/i386-common.c | 9 +++++---- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr87198.c | 13 +++++++++++++ 4 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr87198.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2b4c04b71e2..b00a869707b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2018-09-04 Jakub Jelinek + + PR target/87198 + * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET, + OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use + OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE. + (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET + and OPTION_MASK_ISA_XSAVEC_UNSET. + 2018-09-04 Max Filippov * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c index 1013f82b23d..c7eb859e1c1 100644 --- a/gcc/common/config/i386/i386-common.c +++ b/gcc/common/config/i386/i386-common.c @@ -59,7 +59,7 @@ along with GCC; see the file COPYING3. If not see #define OPTION_MASK_ISA_FXSR_SET OPTION_MASK_ISA_FXSR #define OPTION_MASK_ISA_XSAVE_SET OPTION_MASK_ISA_XSAVE #define OPTION_MASK_ISA_XSAVEOPT_SET \ - (OPTION_MASK_ISA_XSAVEOPT | OPTION_MASK_ISA_XSAVE) + (OPTION_MASK_ISA_XSAVEOPT | OPTION_MASK_ISA_XSAVE_SET) #define OPTION_MASK_ISA_AVX512F_SET \ (OPTION_MASK_ISA_AVX512F | OPTION_MASK_ISA_AVX2_SET) #define OPTION_MASK_ISA_AVX512CD_SET \ @@ -95,9 +95,9 @@ along with GCC; see the file COPYING3. If not see #define OPTION_MASK_ISA_PREFETCHWT1_SET OPTION_MASK_ISA_PREFETCHWT1 #define OPTION_MASK_ISA_CLFLUSHOPT_SET OPTION_MASK_ISA_CLFLUSHOPT #define OPTION_MASK_ISA_XSAVES_SET \ - (OPTION_MASK_ISA_XSAVES | OPTION_MASK_ISA_XSAVE) + (OPTION_MASK_ISA_XSAVES | OPTION_MASK_ISA_XSAVE_SET) #define OPTION_MASK_ISA_XSAVEC_SET \ - (OPTION_MASK_ISA_XSAVEC | OPTION_MASK_ISA_XSAVE) + (OPTION_MASK_ISA_XSAVEC | OPTION_MASK_ISA_XSAVE_SET) #define OPTION_MASK_ISA_CLWB_SET OPTION_MASK_ISA_CLWB /* SSE4 includes both SSE4.1 and SSE4.2. -msse4 should be the same @@ -185,7 +185,8 @@ along with GCC; see the file COPYING3. If not see #define OPTION_MASK_ISA_FMA_UNSET OPTION_MASK_ISA_FMA #define OPTION_MASK_ISA_FXSR_UNSET OPTION_MASK_ISA_FXSR #define OPTION_MASK_ISA_XSAVE_UNSET \ - (OPTION_MASK_ISA_XSAVE | OPTION_MASK_ISA_XSAVEOPT_UNSET) + (OPTION_MASK_ISA_XSAVE | OPTION_MASK_ISA_XSAVEOPT_UNSET \ + | OPTION_MASK_ISA_XSAVES_UNSET | OPTION_MASK_ISA_XSAVEC_UNSET) #define OPTION_MASK_ISA_XSAVEOPT_UNSET OPTION_MASK_ISA_XSAVEOPT #define OPTION_MASK_ISA_AVX2_UNSET \ (OPTION_MASK_ISA_AVX2 | OPTION_MASK_ISA_AVX512F_UNSET) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 68c0274c982..919c0e02b5c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-09-04 Jakub Jelinek + + PR target/87198 + * gcc.target/i386/pr87198.c: New test. + 2018-09-04 Rainer Orth PR target/86744 diff --git a/gcc/testsuite/gcc.target/i386/pr87198.c b/gcc/testsuite/gcc.target/i386/pr87198.c new file mode 100644 index 00000000000..7a52e7c9b90 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr87198.c @@ -0,0 +1,13 @@ +/* PR target/87198 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -mxsavec -mno-xsave" } */ + +#include + +void +test_xsavec (void *__A, long long __B) +{ + _xsavec (__A, __B); +} + +/* { dg-error "target specific option mismatch" "" { target *-*-* } 0 } */ -- 2.30.2