svn commit: r327965 - head/sys/amd64/include
Konstantin Belousov
kib at FreeBSD.org
Sun Jan 14 12:39:51 UTC 2018
Author: kib
Date: Sun Jan 14 12:39:50 2018
New Revision: 327965
URL: https://svnweb.freebsd.org/changeset/base/327965
Log:
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
Modified:
head/sys/amd64/include/cpufunc.h
Modified: head/sys/amd64/include/cpufunc.h
==============================================================================
--- head/sys/amd64/include/cpufunc.h Sun Jan 14 12:36:23 2018 (r327964)
+++ head/sys/amd64/include/cpufunc.h Sun Jan 14 12:39:50 2018 (r327965)
@@ -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,
More information about the svn-src-head
mailing list