diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-02-17 18:11:28 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-02-17 18:11:28 +0000 |
commit | 7be207bc38f7d388e934c5095361eee1f48f42bc (patch) | |
tree | 7fdcb34f7e0655cbe85cba0d75d7c6365419d1e1 /gcc/common/config | |
parent | a4d6d852293c2741c431cf1161dd43db79902cbd (diff) | |
download | gcc-7be207bc38f7d388e934c5095361eee1f48f42bc.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245540 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/common/config')
-rw-r--r-- | gcc/common/config/i386/i386-common.c | 15 |
1 files changed, 15 insertions, 0 deletions
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) { |