Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jan 2018 12:39:50 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r327965 - head/sys/amd64/include
Message-ID:  <201801141239.w0ECdoFq034956@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801141239.w0ECdoFq034956>