Completely remove __rdtsc define. (#4510)

This commit is contained in:
arcum42 2021-07-17 19:34:33 -07:00 committed by GitHub
parent dba223eb18
commit 6d9d39d4c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 21 deletions

View File

@ -227,27 +227,6 @@
#endif
}
#ifdef __GNUC__
// gcc 4.8 define __rdtsc but unfortunately the compiler crash...
// The redefine allow to skip the gcc __rdtsc version -- Gregory
#define __rdtsc _lnx_rdtsc
//static unsigned long long __rdtsc()
static unsigned long long _lnx_rdtsc()
{
#if defined(__amd64__) || defined(__x86_64__)
unsigned long long low, high;
__asm__ __volatile__("rdtsc" : "=a"(low), "=d"(high));
return low | (high << 32);
#else
unsigned long long retval;
__asm__ __volatile__("rdtsc" : "=A"(retval));
return retval;
#endif
}
#endif
#endif
extern std::string format(const char* fmt, ...);