#define USE_RDTSC 1
static inline unsigned long long rdtsc(void) {
unsigned long long r;
__asm__ __volatile__ ("rdtsc\n"
"shl $32,%%rdx\n"
"or %%rdx,%%rax\n"
"movq %%rax,%0" : "=r"(r) : : "edx", "eax", "rdx", "rax");
return r;
}
Created
November 26, 2022 17:10
-
-
Save noushi/e92c35d6142608ec8452e1a1f36564f0 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment