x86: Add rdtscp32() into cpufunc.h.

Suggested by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27986
This commit is contained in:
Konstantin Belousov 2021-01-09 22:39:19 +02:00
parent 826fc3cc3d
commit 45974de8fb
2 changed files with 18 additions and 0 deletions

View File

@ -412,6 +412,15 @@ rdtsc32(void)
return (rv);
}
static __inline uint32_t
rdtscp32(void)
{
uint32_t rv;
__asm __volatile("rdtscp" : "=a" (rv) : : "ecx", "edx");
return (rv);
}
static __inline void
wbinvd(void)
{

View File

@ -412,6 +412,15 @@ rdtsc32(void)
return (rv);
}
static __inline uint32_t
rdtscp32(void)
{
uint32_t rv;
__asm __volatile("rdtscp" : "=a" (rv) : : "ecx", "edx");
return (rv);
}
static __inline void
wbinvd(void)
{