Here is it.
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.
Thanks,
Julia
-----Original Message-----
From: Uros Bizjak [mailto:[email protected]]
Sent: Wednesday, January 11, 2017 1:02 PM
To: Koval, Julia <[email protected]>
Cc: Andrew Senkevich <[email protected]>; GCC Patches
<[email protected]>; [email protected]; [email protected]; Jakub
Jelinek <[email protected]>
Subject: Re: [PATCH] Enable SGX intrinsics
On Wed, Jan 11, 2017 at 12:40 PM, Koval, Julia <[email protected]> wrote:
> Ok, fixed it. Can you please commit it for me, cause I don't have rights to
> commit?
OK, but please send me updated ChangeLogs.
Uros.
> Thanks,
> Julia
>
> -----Original Message-----
> From: Uros Bizjak [mailto:[email protected]]
> Sent: Wednesday, January 11, 2017 12:11 PM
> To: Koval, Julia <[email protected]>
> Cc: Andrew Senkevich <[email protected]>; GCC Patches
> <[email protected]>; [email protected]; [email protected];
> Jakub Jelinek <[email protected]>
> Subject: Re: [PATCH] Enable SGX intrinsics
>
> On Wed, Jan 11, 2017 at 11:31 AM, Koval, Julia <[email protected]> wrote:
>> Ok. I fixed the enum formatting and the enums remain internal.
>
> @@ -7023,7 +7029,6 @@ ix86_can_inline_p (tree caller, tree callee)
> bool ret = false;
> tree caller_tree = DECL_FUNCTION_SPECIFIC_TARGET (caller);
> tree callee_tree = DECL_FUNCTION_SPECIFIC_TARGET (callee);
> -
> /* If callee has no option attributes, then it is ok to inline. */
> if (!callee_tree)
> ret = true;
>
>
> No need for the above whitespace change.
>
> OK for mainline with the above part reverted.
>
> Thanks,
> Uros.