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,
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to