summaryrefslogtreecommitdiff
path: root/gcc/config/i386/i386-c.c
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-18 17:24:39 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-18 17:24:39 +0000
commitd2a15bb86011faf9aee1115ccd7964c9b1eb14e0 (patch)
treeb59f28405a8840d4ab39c3854797c53cc153f3e1 /gcc/config/i386/i386-c.c
parent42f875c31a38c8f2f78cda2febbba016efcc2c01 (diff)
downloadgcc-d2a15bb86011faf9aee1115ccd7964c9b1eb14e0.tar.gz
Add -mavx2.
2011-08-18 Kirill Yukhin <kirill.yukhin@intel.com> * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX2_SET): New. (OPTION_MASK_ISA_AVX_UNSET): Update. (OPTION_MASK_ISA_AVX2_UNSET): New. (ix86_handle_option): Handle OPT_mavx2 case. * config/i386/cpuid.h (bit_AVX2): New. * config/i386/driver-i386.c (host_detect_local_cpu): Detect AVX2 feature. * config/i386/i386-c.c (ix86_target_macros_internal): Conditionally define __AVX2__. * config/i386/i386.c (ix86_option_override_internal): Define PTA_AVX2. Define "core-avx2" processor alias. Handle avx2 option. (ix86_valid_target_attribute_inner_p): Handle avx2 option. * config/i386/i386.h (TARGET_AVX2): New. * config/i386/i386.opt (mavx2): New. * doc/invoke.texi: Document -mavx2. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177876 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386/i386-c.c')
-rw-r--r--gcc/config/i386/i386-c.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c
index c5a770fcae7..5c1dfe61038 100644
--- a/gcc/config/i386/i386-c.c
+++ b/gcc/config/i386/i386-c.c
@@ -257,6 +257,8 @@ ix86_target_macros_internal (HOST_WIDE_INT isa_flag,
def_or_undef (parse_in, "__PCLMUL__");
if (isa_flag & OPTION_MASK_ISA_AVX)
def_or_undef (parse_in, "__AVX__");
+ if (isa_flag & OPTION_MASK_ISA_AVX2)
+ def_or_undef (parse_in, "__AVX2__");
if (isa_flag & OPTION_MASK_ISA_FMA)
def_or_undef (parse_in, "__FMA__");
if (isa_flag & OPTION_MASK_ISA_SSE4A)