From 4c4f6f7830d405da61038198557fef85ca9a2285 Mon Sep 17 00:00:00 2001 From: Hane Date: Wed, 12 Jul 2023 22:37:20 +0200 Subject: [PATCH] pp --- src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; //| }