Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jan 2018 10:43:01 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r328216 - stable/11/sys/amd64/include
Message-ID:  <201801211043.w0LAh12u058759@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Jan 21 10:43:01 2018
New Revision: 328216
URL: https://svnweb.freebsd.org/changeset/base/328216

Log:
  MFC r327965:
  Add STAC and CLAC instructions wrappers.

Modified:
  stable/11/sys/amd64/include/cpufunc.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/include/cpufunc.h
==============================================================================
--- stable/11/sys/amd64/include/cpufunc.h	Sun Jan 21 10:39:57 2018	(r328215)
+++ stable/11/sys/amd64/include/cpufunc.h	Sun Jan 21 10:43:01 2018	(r328216)
@@ -862,6 +862,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");
+}
+
 #else /* !(__GNUCLIKE_ASM && __CC_SUPPORTS___INLINE) */
 
 int	breakpoint(void);



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