Espresso 0.0.2c
This commit is contained in:
15
include/arch/x86/intrin.h
Normal file
15
include/arch/x86/intrin.h
Normal file
@ -0,0 +1,15 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user