summaryrefslogtreecommitdiffstats
path: root/sys/amd64
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/amd64
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/amd64')
-rw-r--r--sys/amd64/include/cpufunc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h
index c0c5b0a..f2961d6 100644
--- a/sys/amd64/include/cpufunc.h
+++ b/sys/amd64/include/cpufunc.h
@@ -107,6 +107,13 @@ clflush(u_long addr)
}
static __inline void
+clflushopt(u_long addr)
+{
+
+ __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr));
+}
+
+static __inline void
clts(void)
{
OpenPOWER on IntegriCloud