This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Enable SGX intrinsics
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "Koval, Julia" <julia dot koval at intel dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "vaalfreja at gmail dot com" <vaalfreja at gmail dot com>, "Senkevich, Andrew" <andrew dot senkevich at intel dot com>
- Date: Fri, 30 Dec 2016 09:25:49 +0100
- Subject: Re: [PATCH] Enable SGX intrinsics
- Authentication-results: sourceware.org; auth=none
- References: <4E89A029A0F8D443B436A5167BA3C53F1992B4B3@IRSMSX101.ger.corp.intel.com>
On Thu, Dec 29, 2016 at 10:50 AM, Koval, Julia <julia.koval@intel.com> wrote:
> Hi,
>
> This patch enables Intel SGX instructions (Reference: https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf page 4478 in pdf and 3D 41-1 in page numbers) Ok for trunk?
I don't like asm macros, but since we can tolerate similar
implementation of cpuid, we can also tolerate encls/enclu.
One genreal remark:
+#define macro_encls_bc(leaf, b, c, retval) \
+ __asm__ __volatile__ ("encls\n\t" \
+ : "=a" (retval) \
+ : "a" (leaf), "b" (b), "c" (c))
These internal macros are user-visible, so please uglify them with a
double underscore, like
__encls_bc
to put them into internal namespace. IMO, there is no need to use
"macro" prefix.
Uros.