Add STAC and CLAC instructions wrappers.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D13838
This commit is contained in:
kib 2018-01-14 12:39:50 +00:00
parent dcd37bb111
commit f98ceb5bd2

View File

@ -836,6 +836,20 @@ intr_restore(register_t rflags)
write_rflags(rflags);
}
static __inline void
stac(void)
{
__asm __volatile("stac" : : : "cc");
}
static __inline void
clac(void)
{
__asm __volatile("clac" : : : "cc");
}
enum {
SGX_ECREATE = 0x0,
SGX_EADD = 0x1,