1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-02-06 18:29:47 +00:00

Add CLFLUSHOPT instruction wrappers.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2015-10-23 11:45:38 +00:00
parent c0db387d25
commit 3f8e071052
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=289824
2 changed files with 14 additions and 0 deletions

View File

@ -106,6 +106,13 @@ clflush(u_long addr)
__asm __volatile("clflush %0" : : "m" (*(char *)addr));
}
static __inline void
clflushopt(u_long addr)
{
__asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr));
}
static __inline void
clts(void)
{

View File

@ -85,6 +85,13 @@ clflush(u_long addr)
__asm __volatile("clflush %0" : : "m" (*(char *)addr));
}
static __inline void
clflushopt(u_long addr)
{
__asm __volatile(".byte 66;clflush %0" : : "m" (*(char *)addr));
}
static __inline void
clts(void)
{