16 lines
220 B
C
16 lines
220 B
C
#ifndef _INTRINSICS_H
|
|
#define _INTRINSICS_H
|
|
|
|
#include <stdint.h>
|
|
|
|
static inline uint64_t rdtsc(void)
|
|
{
|
|
uint32_t lo, hi;
|
|
asm volatile ("rdtsc" : "=a"(lo), "=d"(hi));
|
|
|
|
return ((uint64_t) hi << 32) | lo;
|
|
}
|
|
|
|
|
|
#endif
|