diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2015-10-23 11:45:38 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2015-10-23 11:45:38 +0000 |
commit | 3f8e0710526be16fc955664f572af7da6146235a (patch) | |
tree | 127aabf1ee0b6748a80f26ee161a3ea03254c738 /sys/i386 | |
parent | c0db387d253b59849ed1cf61f5e0fb14a8503c89 (diff) | |
download | src-3f8e0710526be16fc955664f572af7da6146235a.tar.gz src-3f8e0710526be16fc955664f572af7da6146235a.zip |
Add CLFLUSHOPT instruction wrappers.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=289824
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/include/cpufunc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 3bc25d42116e..ca7207d85663 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) { |