Add CLFLUSHOPT instruction wrappers.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
kib 2015-10-23 11:45:38 +00:00
parent 89907eb85e
commit 7eb36dd3f9
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)
{