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


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.


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