diff options
author | Julia Koval <julia.koval@intel.com> | 2017-12-12 06:17:03 +0100 |
---|---|---|
committer | Kirill Yukhin <kyukhin@gcc.gnu.org> | 2017-12-12 05:17:03 +0000 |
commit | b7b0a4fa6026762073b117a8e6b664f2ec7dd9c7 (patch) | |
tree | e1f1e816e3345a68f4a878947e920cb6f997107e /gcc/common | |
parent | 102d484d482d055c2e9d0a6c383ca6437f45fe97 (diff) | |
download | gcc-b7b0a4fa6026762073b117a8e6b664f2ec7dd9c7.zip gcc-b7b0a4fa6026762073b117a8e6b664f2ec7dd9c7.tar.gz gcc-b7b0a4fa6026762073b117a8e6b664f2ec7dd9c7.tar.bz2 |
Enable VAES support [1/5]
gcc/
* common/config/i386/i386-common.c (OPTION_MASK_ISA_VAES_SET,
OPTION_MASK_ISA_VAES_UNSET): New.
(ix86_handle_option): Handle -mvaes.
* config/i386/cpuid.h: Define bit_VAES.
* config/i386/driver-i386.c (host_detect_local_cpu): Detect -mvaes.
* config/i386/i386-c.c (__VAES__): New.
* config/i386/i386.c (ix86_target_string): Add -mvaes.
(ix86_valid_target_attribute_inner_p): Ditto.
* config/i386/i386.h (TARGET_VAES, TARGET_VAES_P): New.
* config/i386/i386.opt: Add -mvaes.
* doc/invoke.texi: Ditto.
From-SVN: r255571
Diffstat (limited to 'gcc/common')
-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 e573178..575a914 100644 --- a/gcc/common/config/i386/i386-common.c +++ b/gcc/common/config/i386/i386-common.c @@ -142,6 +142,7 @@ along with GCC; see the file COPYING3. If not see #define OPTION_MASK_ISA_GFNI_SET OPTION_MASK_ISA_GFNI #define OPTION_MASK_ISA_IBT_SET OPTION_MASK_ISA_IBT #define OPTION_MASK_ISA_SHSTK_SET OPTION_MASK_ISA_SHSTK +#define OPTION_MASK_ISA_VAES_SET OPTION_MASK_ISA_VAES /* Define a set of ISAs which aren't available when a given ISA is disabled. MMX and SSE ISAs are handled separately. */ @@ -212,6 +213,7 @@ along with GCC; see the file COPYING3. If not see #define OPTION_MASK_ISA_GFNI_UNSET OPTION_MASK_ISA_GFNI #define OPTION_MASK_ISA_IBT_UNSET OPTION_MASK_ISA_IBT #define OPTION_MASK_ISA_SHSTK_UNSET OPTION_MASK_ISA_SHSTK +#define OPTION_MASK_ISA_VAES_UNSET OPTION_MASK_ISA_VAES /* SSE4 includes both SSE4.1 and SSE4.2. -mno-sse4 should the same as -mno-sse4.1. */ @@ -539,6 +541,19 @@ ix86_handle_option (struct gcc_options *opts, } return true; + case OPT_mvaes: + if (value) + { + opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA_VAES_SET; + opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA_VAES_SET; + } + else + { + opts->x_ix86_isa_flags2 &= ~OPTION_MASK_ISA_VAES_UNSET; + opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA_VAES_UNSET; + } + return true; + case OPT_mavx5124fmaps: if (value) { |