aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386/i386-c.c
diff options
context:
space:
mode:
authorJulia Koval <julia.koval@intel.com>2017-01-11 22:41:13 +0100
committerUros Bizjak <uros@gcc.gnu.org>2017-01-11 22:41:13 +0100
commit73e32c4743fbd0d2c16ea2fb9212540707f3c01a (patch)
tree6e7af7c398ddeaf7f3020e2a3e115d1141000752 /gcc/config/i386/i386-c.c
parentfa8438f71ce56891ea29eedb3a330c4359d18e9c (diff)
downloadgcc-73e32c4743fbd0d2c16ea2fb9212540707f3c01a.zip
gcc-73e32c4743fbd0d2c16ea2fb9212540707f3c01a.tar.gz
gcc-73e32c4743fbd0d2c16ea2fb9212540707f3c01a.tar.bz2
i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
* common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New. (OPTION_MASK_ISA_SGX_SET): New. (ix86_handle_option): Handle OPT_msgx. * config.gcc: Added sgxintrin.h. * config/i386/driver-i386.c (host_detect_local_cpu): Detect sgx. * config/i386/i386-c.c (ix86_target_macros_internal): Define __SGX__. * config/i386/i386.c (ix86_target_string): Add -msgx. (PTA_SGX): New. (ix86_option_override_internal): Handle new options. (ix86_valid_target_attribute_inner_p): Add sgx. * config/i386/i386.h (TARGET_SGX, TARGET_SGX_P): New. * config/i386/i386.opt: Add msgx. * config/i386/sgxintrin.h: New file. * config/i386/x86intrin.h: Add sgxintrin.h. testsuite/ChangeLog: * gcc.target/i386/sgx.c New test. * gcc.target/i386/sse-12.c: Add -msgx. * 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. Co-Authored-By: Uros Bizjak <ubizjak@gmail.com> From-SVN: r244339
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 855ff79..b05ba25 100644
--- a/gcc/config/i386/i386-c.c
+++ b/gcc/config/i386/i386-c.c
@@ -378,6 +378,8 @@ ix86_target_macros_internal (HOST_WIDE_INT isa_flag,
def_or_undef (parse_in, "__AVX512IFMA__");
if (isa_flag2 & OPTION_MASK_ISA_AVX5124VNNIW)
def_or_undef (parse_in, "__AVX5124VNNIW__");
+ if (isa_flag2 & OPTION_MASK_ISA_SGX)
+ def_or_undef (parse_in, "__SGX__");
if (isa_flag2 & OPTION_MASK_ISA_AVX5124FMAPS)
def_or_undef (parse_in, "__AVX5124FMAPS__");
if (isa_flag2 & OPTION_MASK_ISA_AVX512VPOPCNTDQ)