diff --git a/src/main.cpp b/src/main.cpp index 3044340..1d31057 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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; //| }