https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87534

            Bug ID: 87534
           Summary: Typo in sgxintrin.h
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: ubizjak at gmail dot com
  Target Milestone: ---
            Target: i386,x86-64

#define __enclv_bc(leaf, b, c, retval)                  \
  __asm__ __volatile__("enclv\n\t"                      \
           : "=a" (retval)                              \
           : "a" (leaf), "b" (b), "c" (c)               \
           : "cc")

#define __enclv_cd(leaf, c, d, retval)                  \
  __asm__ __volatile__("enclv\n\t"                      \
           : "=a" (retval)                              \
           : "a" (leaf), "c" (c), "d" (d)               \
           : "cc")

#define __enclv_generic(leaf, b, c, d, retval)          \
  __asm__ __volatile__("enclv\n\t"                      \
           : "=a" (retval), "=b" (b), "=c" (b), "=d" (d)\
           : "a" (leaf), "b" (b), "c" (c), "d" (d)      \
           : "cc")

But SGX spec has

ENCLS—Execute an Enclave System Function of Specified Leaf Number
ENCLU—Execute an Enclave User Function of Specified Leaf Number

There is no ENCLV instruction.

Reply via email to