From 1d516992d1bcea0a211a55a7276ab1c2a584dbef Mon Sep 17 00:00:00 2001 From: Julia Koval Date: Fri, 17 Feb 2017 19:11:28 +0100 Subject: [PATCH] i386-common.c (OPTION_MASK_ISA_RDPID_SET): New. * common/config/i386/i386-common.c (OPTION_MASK_ISA_RDPID_SET): New. (OPTION_MASK_ISA_PKU_UNSET): New. (ix86_handle_option): Handle -mrdpid. * config/i386/cpuid.h (bit_RDPID): New. * config/i386/driver-i386.c (host_detect_local_cpu): Detect RDPID feature. * config/i386/i386-builtin.def (__builtin_ia32_rdpid): New. * config/i386/i386-c.c (ix86_target_macros_internal): Handle RDPID flag. * config/i386/i386.c (ix86_target_string): Add -mrdpid to isa2_opts. (ix86_valid_target_attribute_inner_p): Add "rdpid". (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID. * config/i386/i386.h (TARGET_RDPID, TARGET_RDPID_P): New. * config/i386/i386.md (define_insn "rdpid"): New. * config/i386/i386.opt Add -mrdpid. * config/i386/immintrin.h (_rdpid_u32): New. testsuite/ChangeLog: * gcc.target/i386/rdpid.c New test. * gcc.target/i386/sse-12.c: Add -mrdpid. * gcc.target/i386/sse-13.c: Ditto. * gcc.target/i386/sse-14.c: Ditto. * gcc.target/i386/sse-22.c: Ditto. * gcc.target/i386/sse-23.c: Ditto. * g++.dg/other/i386-2.C: Ditto. * g++.dg/other/i386-3.C: Ditto. From-SVN: r245540 --- gcc/ChangeLog | 19 +++++++++++++++++++ gcc/common/config/i386/i386-common.c | 15 +++++++++++++++ gcc/config/i386/cpuid.h | 1 + gcc/config/i386/driver-i386.c | 7 +++++-- gcc/config/i386/i386-builtin.def | 3 +++ gcc/config/i386/i386-c.c | 2 ++ gcc/config/i386/i386.c | 6 ++++++ gcc/config/i386/i386.h | 3 ++- gcc/config/i386/i386.md | 10 ++++++++++ gcc/config/i386/i386.opt | 4 ++++ gcc/config/i386/immintrin.h | 16 ++++++++++++++++ gcc/testsuite/ChangeLog | 11 +++++++++++ gcc/testsuite/g++.dg/other/i386-2.C | 3 ++- gcc/testsuite/g++.dg/other/i386-3.C | 2 +- gcc/testsuite/gcc.target/i386/rdpid.c | 11 +++++++++++ gcc/testsuite/gcc.target/i386/sse-12.c | 2 +- gcc/testsuite/gcc.target/i386/sse-13.c | 2 +- gcc/testsuite/gcc.target/i386/sse-14.c | 2 +- gcc/testsuite/gcc.target/i386/sse-22.c | 2 +- gcc/testsuite/gcc.target/i386/sse-23.c | 2 +- 20 files changed, 113 insertions(+), 10 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/rdpid.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d4a0c0def35..10eda1e4cff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +2017-02-17 Julia Koval + + * common/config/i386/i386-common.c (OPTION_MASK_ISA_RDPID_SET): New. + (OPTION_MASK_ISA_PKU_UNSET): New. + (ix86_handle_option): Handle -mrdpid. + * config/i386/cpuid.h (bit_RDPID): New. + * config/i386/driver-i386.c (host_detect_local_cpu): + Detect RDPID feature. + * config/i386/i386-builtin.def (__builtin_ia32_rdpid): New. + * config/i386/i386-c.c (ix86_target_macros_internal): + Handle RDPID flag. + * config/i386/i386.c (ix86_target_string): Add -mrdpid to isa2_opts. + (ix86_valid_target_attribute_inner_p): Add "rdpid". + (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID. + * config/i386/i386.h (TARGET_RDPID, TARGET_RDPID_P): New. + * config/i386/i386.md (define_insn "rdpid"): New. + * config/i386/i386.opt Add -mrdpid. + * config/i386/immintrin.h (_rdpid_u32): New. + 2017-02-17 Vladimir Makarov PR rtl-optimization/79541 diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c index 5f6c3e2d108..8284a311d25 100644 --- a/gcc/common/config/i386/i386-common.c +++ b/gcc/common/config/i386/i386-common.c @@ -134,6 +134,7 @@ along with GCC; see the file COPYING3. If not see #define OPTION_MASK_ISA_MWAITX_SET OPTION_MASK_ISA_MWAITX #define OPTION_MASK_ISA_CLZERO_SET OPTION_MASK_ISA_CLZERO #define OPTION_MASK_ISA_PKU_SET OPTION_MASK_ISA_PKU +#define OPTION_MASK_ISA_RDPID_SET OPTION_MASK_ISA_RDPID /* Define a set of ISAs which aren't available when a given ISA is disabled. MMX and SSE ISAs are handled separately. */ @@ -198,6 +199,7 @@ along with GCC; see the file COPYING3. If not see #define OPTION_MASK_ISA_MWAITX_UNSET OPTION_MASK_ISA_MWAITX #define OPTION_MASK_ISA_CLZERO_UNSET OPTION_MASK_ISA_CLZERO #define OPTION_MASK_ISA_PKU_UNSET OPTION_MASK_ISA_PKU +#define OPTION_MASK_ISA_RDPID_UNSET OPTION_MASK_ISA_RDPID /* SSE4 includes both SSE4.1 and SSE4.2. -mno-sse4 should the same as -mno-sse4.1. */ @@ -457,6 +459,19 @@ ix86_handle_option (struct gcc_options *opts, } return true; + case OPT_mrdpid: + if (value) + { + opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA_RDPID_SET; + opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA_RDPID_SET; + } + else + { + opts->x_ix86_isa_flags2 &= ~OPTION_MASK_ISA_RDPID_UNSET; + opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA_RDPID_UNSET; + } + return true; + case OPT_mavx5124fmaps: if (value) { diff --git a/gcc/config/i386/cpuid.h b/gcc/config/i386/cpuid.h index 0939e9e6696..41901c0f3a8 100644 --- a/gcc/config/i386/cpuid.h +++ b/gcc/config/i386/cpuid.h @@ -98,6 +98,7 @@ #define bit_PKU (1 << 3) #define bit_OSPKE (1 << 4) #define bit_AVX512VPOPCNTDQ (1 << 14) +#define bit_RDPID (1 << 22) /* %edx */ #define bit_AVX5124VNNIW (1 << 2) diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c index 0925cacb556..6c812514239 100644 --- a/gcc/config/i386/driver-i386.c +++ b/gcc/config/i386/driver-i386.c @@ -413,7 +413,7 @@ const char *host_detect_local_cpu (int argc, const char **argv) unsigned int has_clflushopt = 0, has_xsavec = 0, has_xsaves = 0; unsigned int has_avx512dq = 0, has_avx512bw = 0, has_avx512vl = 0; unsigned int has_avx512vbmi = 0, has_avx512ifma = 0, has_clwb = 0; - unsigned int has_mwaitx = 0, has_clzero = 0, has_pku = 0; + unsigned int has_mwaitx = 0, has_clzero = 0, has_pku = 0, has_rdpid = 0; unsigned int has_avx5124fmaps = 0, has_avx5124vnniw = 0; bool arch; @@ -503,6 +503,8 @@ const char *host_detect_local_cpu (int argc, const char **argv) has_prefetchwt1 = ecx & bit_PREFETCHWT1; has_avx512vbmi = ecx & bit_AVX512VBMI; has_pku = ecx & bit_OSPKE; + has_rdpid = ecx & bit_RDPID; + has_avx5124vnniw = edx & bit_AVX5124VNNIW; has_avx5124fmaps = edx & bit_AVX5124FMAPS; } @@ -1032,6 +1034,7 @@ const char *host_detect_local_cpu (int argc, const char **argv) const char *mwaitx = has_mwaitx ? " -mmwaitx" : " -mno-mwaitx"; const char *clzero = has_clzero ? " -mclzero" : " -mno-clzero"; const char *pku = has_pku ? " -mpku" : " -mno-pku"; + const char *rdpid = has_rdpid ? " -mrdpid" : " -mno-rdpid"; options = concat (options, mmx, mmx3dnow, sse, sse2, sse3, ssse3, sse4a, cx16, sahf, movbe, aes, sha, pclmul, popcnt, abm, lwp, fma, fma4, xop, bmi, sgx, bmi2, @@ -1041,7 +1044,7 @@ const char *host_detect_local_cpu (int argc, const char **argv) avx512cd, avx512pf, prefetchwt1, clflushopt, xsavec, xsaves, avx512dq, avx512bw, avx512vl, avx512ifma, avx512vbmi, avx5124fmaps, avx5124vnniw, - clwb, mwaitx, clzero, pku, NULL); + clwb, mwaitx, clzero, pku, rdpid, NULL); } done: diff --git a/gcc/config/i386/i386-builtin.def b/gcc/config/i386/i386-builtin.def index a8fe0a510a4..4b9442decd1 100644 --- a/gcc/config/i386/i386-builtin.def +++ b/gcc/config/i386/i386-builtin.def @@ -2555,6 +2555,9 @@ BDESC (OPTION_MASK_ISA_AVX512VPOPCNTDQ, CODE_FOR_vpopcountv16si_mask, "__builtin BDESC (OPTION_MASK_ISA_AVX512VPOPCNTDQ, CODE_FOR_vpopcountv8di, "__builtin_ia32_vpopcountq_v8di", IX86_BUILTIN_VPOPCOUNTQV8DI, UNKNOWN, (int) V8DI_FTYPE_V8DI) BDESC (OPTION_MASK_ISA_AVX512VPOPCNTDQ, CODE_FOR_vpopcountv8di_mask, "__builtin_ia32_vpopcountq_v8di_mask", IX86_BUILTIN_VPOPCOUNTQV8DI_MASK, UNKNOWN, (int) V8DI_FTYPE_V8DI_V8DI_UQI) +/* RDPID */ +BDESC (OPTION_MASK_ISA_RDPID, CODE_FOR_rdpid, "__builtin_ia32_rdpid", IX86_BUILTIN_RDPID, UNKNOWN, (int) UNSIGNED_FTYPE_VOID) + BDESC_END (ARGS2, MPX) /* Builtins for MPX. */ diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c index b05ba25f982..9a79a215bec 100644 --- a/gcc/config/i386/i386-c.c +++ b/gcc/config/i386/i386-c.c @@ -448,6 +448,8 @@ ix86_target_macros_internal (HOST_WIDE_INT isa_flag, def_or_undef (parse_in, "__MWAITX__"); if (isa_flag & OPTION_MASK_ISA_PKU) def_or_undef (parse_in, "__PKU__"); + if (isa_flag2 & OPTION_MASK_ISA_RDPID) + def_or_undef (parse_in, "__RDPID__"); if (TARGET_IAMCU) { def_or_undef (parse_in, "__iamcu"); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index daa230315d0..a1c084f1b8f 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4281,6 +4281,7 @@ ix86_target_string (HOST_WIDE_INT isa, HOST_WIDE_INT isa2, ISAs come first. Target string will be displayed in the same order. */ static struct ix86_target_opts isa2_opts[] = { + { "-mrdpid", OPTION_MASK_ISA_RDPID }, { "-msgx", OPTION_MASK_ISA_SGX }, { "-mavx5124vnniw", OPTION_MASK_ISA_AVX5124VNNIW }, { "-mavx5124fmaps", OPTION_MASK_ISA_AVX5124FMAPS }, @@ -4348,6 +4349,7 @@ ix86_target_string (HOST_WIDE_INT isa, HOST_WIDE_INT isa2, { "-mmpx", OPTION_MASK_ISA_MPX }, { "-mclwb", OPTION_MASK_ISA_CLWB } }; + /* Flag options. */ static struct ix86_target_opts flag_opts[] = { @@ -6711,6 +6713,7 @@ ix86_valid_target_attribute_inner_p (tree args, char *p_strings[], IX86_ATTR_ISA ("fxsr", OPT_mfxsr), IX86_ATTR_ISA ("mpx", OPT_mmpx), IX86_ATTR_ISA ("clwb", OPT_mclwb), + IX86_ATTR_ISA ("rdpid", OPT_mrdpid), /* enum options */ IX86_ATTR_ENUM ("fpmath=", OPT_mfpmath_), @@ -38689,6 +38692,9 @@ s4fma_expand: } return target; } + case IX86_BUILTIN_RDPID: + return ix86_expand_special_args_builtin (bdesc_args2 + i, exp, + target); default: return ix86_expand_args_builtin (bdesc_args2 + i, exp, target); } diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 2d1d39c3f6e..9e5f4d857d9 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -102,6 +102,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define TARGET_ABM_P(x) TARGET_ISA_ABM_P(x) #define TARGET_SGX TARGET_ISA_SGX #define TARGET_SGX_P(x) TARGET_ISA_SGX_P(x) +#define TARGET_RDPID TARGET_ISA_RDPID +#define TARGET_RDPID_P(x) TARGET_ISA_RDPID_P(x) #define TARGET_BMI TARGET_ISA_BMI #define TARGET_BMI_P(x) TARGET_ISA_BMI_P(x) #define TARGET_BMI2 TARGET_ISA_BMI2 @@ -167,7 +169,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define TARGET_PKU TARGET_ISA_PKU #define TARGET_PKU_P(x) TARGET_ISA_PKU_P(x) - #define TARGET_LP64 TARGET_ABI_64 #define TARGET_LP64_P(x) TARGET_ABI_64_P(x) #define TARGET_X32 TARGET_ABI_X32 diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 9d4dc3894a9..cfbe0b050b5 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -273,6 +273,9 @@ ;; For RDPKRU and WRPKRU support UNSPECV_PKU + + ;; For RDPID support + UNSPECV_RDPID ]) ;; Constants to represent rounding modes in the ROUND instruction @@ -19535,6 +19538,13 @@ "wrpkru" [(set_attr "type" "other")]) +(define_insn "rdpid" + [(set (match_operand:SI 0 "register_operand" "=r") + (unspec_volatile:SI [(const_int 0)] UNSPECV_RDPID))] + "TARGET_RDPID" + "rdpid\t%0" + [(set_attr "type" "other")]) + (include "mmx.md") (include "sse.md") (include "sync.md") diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt index 0ee31845eba..b3b961cc3ca 100644 --- a/gcc/config/i386/i386.opt +++ b/gcc/config/i386/i386.opt @@ -741,6 +741,10 @@ msgx Target Report Mask(ISA_SGX) Var(ix86_isa_flags2) Save Support SGX built-in functions and code generation. +mrdpid +Target Report Mask(ISA_RDPID) Var(ix86_isa_flags2) Save +Support RDPID built-in functions and code generation. + mbmi Target Report Mask(ISA_BMI) Var(ix86_isa_flags) Save Support BMI built-in functions and code generation. diff --git a/gcc/config/i386/immintrin.h b/gcc/config/i386/immintrin.h index 80dfefe3c30..b52f58efa40 100644 --- a/gcc/config/i386/immintrin.h +++ b/gcc/config/i386/immintrin.h @@ -113,6 +113,22 @@ _rdrand32_step (unsigned int *__P) #pragma GCC pop_options #endif /* __DISABLE_RDRND__ */ +#ifndef __RDPID__ +#pragma GCC push_options +#pragma GCC target("rdpid") +#define __DISABLE_RDPID__ +#endif /* __RDPID__ */ +extern __inline unsigned int +__attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_rdpid_u32 (void) +{ + return __builtin_ia32_rdpid (); +} +#ifdef __DISABLE_RDPID__ +#undef __DISABLE_RDPID__ +#pragma GCC pop_options +#endif /* __DISABLE_RDPID__ */ + #ifdef __x86_64__ #ifndef __FSGSBASE__ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0f62d8d6c8a..159f84fda7f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2017-02-17 Julia Koval + + * gcc.target/i386/rdpid.c New test. + * gcc.target/i386/sse-12.c: Add -mrdpid. + * gcc.target/i386/sse-13.c: Ditto. + * gcc.target/i386/sse-14.c: Ditto. + * gcc.target/i386/sse-22.c: Ditto. + * gcc.target/i386/sse-23.c: Ditto. + * g++.dg/other/i386-2.C: Ditto. + * g++.dg/other/i386-3.C: Ditto. + 2017-02-17 Segher Boessenkool * gcc.dg/pr59833.c: Add -fsignaling-nans to options. diff --git a/gcc/testsuite/g++.dg/other/i386-2.C b/gcc/testsuite/g++.dg/other/i386-2.C index e8becf921fb..63c5f738baa 100644 --- a/gcc/testsuite/g++.dg/other/i386-2.C +++ b/gcc/testsuite/g++.dg/other/i386-2.C @@ -1,5 +1,6 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ -/* { dg-options "-O -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1 -mxsavec -mxsaves -mclflushopt -mavx512dq -mavx512bw -mavx512vl -mavx512ifma -mavx512vbmi -mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq -mclwb -mmwaitx -mclzero -mpku -msgx" } */ +/* { dg-options "-O -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1 -mxsavec -mxsaves -mclflushopt -mavx512dq -mavx512bw -mavx512vl -mavx512ifma -mavx512vbmi -mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid" } */ + /* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h, fma4intrin.h, xopintrin.h, abmintrin.h, bmiintrin.h, tbmintrin.h, lwpintrin.h, diff --git a/gcc/testsuite/g++.dg/other/i386-3.C b/gcc/testsuite/g++.dg/other/i386-3.C index 26ce7ffc068..16a96efe2a5 100644 --- a/gcc/testsuite/g++.dg/other/i386-3.C +++ b/gcc/testsuite/g++.dg/other/i386-3.C @@ -1,5 +1,5 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ -/* { dg-options "-O -fkeep-inline-functions -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1 -mxsavec -mxsaves -mclflushopt -mavx512dq -mavx512bw -mavx512vl -mavx512ifma -mavx512vbmi -mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq -mclwb -mmwaitx -mclzero -mpku -msgx" } */ +/* { dg-options "-O -fkeep-inline-functions -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1 -mxsavec -mxsaves -mclflushopt -mavx512dq -mavx512bw -mavx512vl -mavx512ifma -mavx512vbmi -mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid" } */ /* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h, fma4intrin.h, xopintrin.h, abmintrin.h, bmiintrin.h, tbmintrin.h, lwpintrin.h, diff --git a/gcc/testsuite/gcc.target/i386/rdpid.c b/gcc/testsuite/gcc.target/i386/rdpid.c new file mode 100644 index 00000000000..33a8084c6d4 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/rdpid.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mrdpid " } */ +/* { dg-final { scan-assembler "rdpid\[ \t]+(%|)eax" } } */ + +#include + +unsigned int +read_rdpid32 (void) +{ + return _rdpid_u32 (); +} diff --git a/gcc/testsuite/gcc.target/i386/sse-12.c b/gcc/testsuite/gcc.target/i386/sse-12.c index 92f3894aeeb..b98b8b60aa7 100644 --- a/gcc/testsuite/gcc.target/i386/sse-12.c +++ b/gcc/testsuite/gcc.target/i386/sse-12.c @@ -3,7 +3,7 @@ popcntintrin.h and mm_malloc.h are usable with -O -std=c89 -pedantic-errors. */ /* { dg-do compile } */ -/* { dg-options "-O -std=c89 -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1 -mxsavec -mxsaves -mclflushopt -mavx512bw -mavx512dq -mavx512vl -mavx512vbmi -mavx512ifma -mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq -mclwb -mmwaitx -mclzero -mpku -msgx" } */ +/* { dg-options "-O -std=c89 -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1 -mxsavec -mxsaves -mclflushopt -mavx512bw -mavx512dq -mavx512vl -mavx512vbmi -mavx512ifma -mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid" } */ #include diff --git a/gcc/testsuite/gcc.target/i386/sse-13.c b/gcc/testsuite/gcc.target/i386/sse-13.c index ff0051bf479..ef207e8dcf1 100644 --- a/gcc/testsuite/gcc.target/i386/sse-13.c +++ b/gcc/testsuite/gcc.target/i386/sse-13.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1 -mxsavec -mxsaves -mclflushopt -mavx512vl -mavx512dq -mavx512bw -mavx512vbmi -mavx512ifma -mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq -mclwb -mmwaitx -mclzero -mpku -msgx" } */ +/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1 -mxsavec -mxsaves -mclflushopt -mavx512vl -mavx512dq -mavx512bw -mavx512vbmi -mavx512ifma -mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid" } */ /* { dg-add-options bind_pic_locally } */ #include diff --git a/gcc/testsuite/gcc.target/i386/sse-14.c b/gcc/testsuite/gcc.target/i386/sse-14.c index 6df6abc9af1..fe628e57179 100644 --- a/gcc/testsuite/gcc.target/i386/sse-14.c +++ b/gcc/testsuite/gcc.target/i386/sse-14.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1 -mxsavec -mxsaves -mclflushopt -mavx512dq -mavx512bw -mavx512vl -mavx512ifma -mavx512vbmi -mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq -mclwb -mmwaitx -mclzero -mpku -msgx" } */ +/* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1 -mxsavec -mxsaves -mclflushopt -mavx512dq -mavx512bw -mavx512vl -mavx512ifma -mavx512vbmi -mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid" } */ /* { dg-add-options bind_pic_locally } */ #include diff --git a/gcc/testsuite/gcc.target/i386/sse-22.c b/gcc/testsuite/gcc.target/i386/sse-22.c index acc06a4a5e5..b8a35d11c45 100644 --- a/gcc/testsuite/gcc.target/i386/sse-22.c +++ b/gcc/testsuite/gcc.target/i386/sse-22.c @@ -707,7 +707,7 @@ test_2 (_mm_clmulepi64_si128, __m128i, __m128i, __m128i, 1) /* x86intrin.h (FMA4/XOP/LWP/BMI/BMI2/TBM/LZCNT/FMA). */ #ifdef DIFFERENT_PRAGMAS -#pragma GCC target ("fma4,xop,lwp,bmi,bmi2,tbm,lzcnt,fma,rdseed,prfchw,adx,fxsr,xsaveopt,xsavec,xsaves,clflushopt,clwb,pku,sgx") +#pragma GCC target ("fma4,xop,lwp,bmi,bmi2,tbm,lzcnt,fma,rdseed,prfchw,adx,fxsr,xsaveopt,xsavec,xsaves,clflushopt,clwb,pku,sgx,rdpid") #endif #include /* xopintrin.h */ diff --git a/gcc/testsuite/gcc.target/i386/sse-23.c b/gcc/testsuite/gcc.target/i386/sse-23.c index f4fcb002bb5..45c31250e96 100644 --- a/gcc/testsuite/gcc.target/i386/sse-23.c +++ b/gcc/testsuite/gcc.target/i386/sse-23.c @@ -603,6 +603,6 @@ #define __builtin_ia32_extracti64x2_256_mask(A, E, C, D) __builtin_ia32_extracti64x2_256_mask(A, 1, C, D) #define __builtin_ia32_extractf64x2_256_mask(A, E, C, D) __builtin_ia32_extractf64x2_256_mask(A, 1, C, D) -#pragma GCC target ("sse4a,3dnow,avx,avx2,fma4,xop,aes,pclmul,popcnt,abm,lzcnt,bmi,bmi2,tbm,lwp,fsgsbase,rdrnd,f16c,fma,rtm,rdseed,prfchw,adx,fxsr,xsaveopt,avx512f,avx512er,avx512cd,avx512pf,sha,prefetchwt1,xsavec,xsaves,clflushopt,avx512bw,avx512dq,avx512vl,avx512vbmi,avx512ifma,avx5124fmaps,avx5124vnniw,avx512vpopcntdq,clwb,mwaitx,clzero,pku,sgx") +#pragma GCC target ("sse4a,3dnow,avx,avx2,fma4,xop,aes,pclmul,popcnt,abm,lzcnt,bmi,bmi2,tbm,lwp,fsgsbase,rdrnd,f16c,fma,rtm,rdseed,prfchw,adx,fxsr,xsaveopt,avx512f,avx512er,avx512cd,avx512pf,sha,prefetchwt1,xsavec,xsaves,clflushopt,avx512bw,avx512dq,avx512vl,avx512vbmi,avx512ifma,avx5124fmaps,avx5124vnniw,avx512vpopcntdq,clwb,mwaitx,clzero,pku,sgx,rdpid") #include -- 2.30.2