This commit is contained in:
Hane 2023-07-12 22:37:20 +02:00
commit 4c4f6f7830

View file

@ -16,7 +16,7 @@ Intel(R) 64 and IA-32 Architectures Software Developer's Manual Volume 3 (3A, 3B
*/
//#ifdef WIN64
#ifndef DEBUG
#define DEBUG
@ -40,9 +40,10 @@ bool checkInvariantTSC(){
uint64_t rdtsc() {
uint64_t raxlo,rdxho;
asm volatile ( ".intel_syntax noprefix\t\n"
"cpuid\n" \
"lfence\n" \
"rdtsc\n" \
//"rdtscp\n" : "=a" (raxlo), "=d" (rdxho), "=c" (aux) : : );
"rdtscp\n" : "=a" (raxlo), "=d" (rdxho));
"lfence\n" : "=a" (raxlo), "=d" (rdxho));
return (rdxho << 32) + raxlo; //|
}