pp
This commit is contained in:
parent
a894ba55c1
commit
4c4f6f7830
1 changed files with 4 additions and 3 deletions
|
|
@ -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; //|
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue