summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-10-23 11:45:38 +0000
committerkib <kib@FreeBSD.org>2015-10-23 11:45:38 +0000
commit7eb36dd3f94bbdd22cd44fd0fd1c86eb868bef1f (patch)
tree127aabf1ee0b6748a80f26ee161a3ea03254c738 /sys/i386
parent89907eb85ed4dd71ebc419a28a2bbff1690445da (diff)
downloadFreeBSD-src-7eb36dd3f94bbdd22cd44fd0fd1c86eb868bef1f.zip
FreeBSD-src-7eb36dd3f94bbdd22cd44fd0fd1c86eb868bef1f.tar.gz
Add CLFLUSHOPT instruction wrappers.
Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/include/cpufunc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h
index 3bc25d4..ca7207d 100644
--- a/sys/i386/include/cpufunc.h
+++ b/sys/i386/include/cpufunc.h
@@ -86,6 +86,13 @@ clflush(u_long addr)
}
static __inline void
+clflushopt(u_long addr)
+{
+
+ __asm __volatile(".byte 66;clflush %0" : : "m" (*(char *)addr));
+}
+
+static __inline void
clts(void)
{
OpenPOWER on IntegriCloud