On Fri, Dec 30, 2016 at 3:17 PM, Koval, Julia <julia.ko...@intel.com> wrote: > Thank you for your comments, how about this patch? Enums are not part of the > intrinsic ABI, they are just meaningful names for constants, taken from > reference doc. > > gcc/ > * common/config/i386/i386-common.c > (OPTION_MASK_ISA_SGX_UNSET, OPTION_MASK_ISA_SGX_SET): New. > (ix86_handle_option): Handle OPT_msgx. > * config.gcc: Added sgxintrin.h. > * config/i386/cpuid.h (bit_SGX): New. > * 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/gcc.target/i386/sgx.c New test > > libgcc/ > config/i386/cpuinfo.c (get_available_features): Handle FEATURE_SGX. > config/i386/cpuinfo.h (FEATURE_SGX): New.
As suggested in [1], you should write multi-line enums like: enum foo { a = ... b = ... } OK with the above change(s), but please wait for Jakub, if he has some more comments. [1] https://www.gnu.org/prep/standards/standards.html Thanks, Uros.