This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] Enable SGX intrinsics


Hi, I rebased the patch onto latest trunk version and changed specification according to ICC:
_enclu_u32 (const int __L, size_t *__D)  -->  _enclu_u32 (const int __L, size_t __D[])

The Changelogs remained the same:

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.

gcc/testsuite/
    * 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: Koval, Julia 
Sent: Wednesday, January 11, 2017 1:08 PM
To: 'Uros Bizjak' <ubizjak@gmail.com>
Cc: Andrew Senkevich <andrew.n.senkevich@gmail.com>; GCC Patches <gcc-patches@gcc.gnu.org>; vaalfreja@gmail.com; kirill.yukhin@gmail.com; Jakub Jelinek <jakub@redhat.com>
Subject: RE: [PATCH] Enable SGX intrinsics

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:ubizjak@gmail.com] 
Sent: Wednesday, January 11, 2017 1:02 PM
To: Koval, Julia <julia.koval@intel.com>
Cc: Andrew Senkevich <andrew.n.senkevich@gmail.com>; GCC Patches <gcc-patches@gcc.gnu.org>; vaalfreja@gmail.com; kirill.yukhin@gmail.com; Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH] Enable SGX intrinsics

On Wed, Jan 11, 2017 at 12:40 PM, Koval, Julia <julia.koval@intel.com> 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:ubizjak@gmail.com]
> Sent: Wednesday, January 11, 2017 12:11 PM
> To: Koval, Julia <julia.koval@intel.com>
> Cc: Andrew Senkevich <andrew.n.senkevich@gmail.com>; GCC Patches <gcc-patches@gcc.gnu.org>; vaalfreja@gmail.com; kirill.yukhin@gmail.com; Jakub Jelinek <jakub@redhat.com>
> Subject: Re: [PATCH] Enable SGX intrinsics
>
> On Wed, Jan 11, 2017 at 11:31 AM, Koval, Julia <julia.koval@intel.com> 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.

Attachment: 0001-SGX-intrinsiks.patch
Description: 0001-SGX-intrinsiks.patch


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]