I think documentation answers this question. You probably have x86 code that you are building for x86-64. A is valid for x86, but not for x86-64. GCC documentation explains how to replace A by a for x86-64:
"This is not correct on x86-64 as it would allocate tick in either ax or dx. You have to use the following variant instead:"
unsigned long long rdtsc (void)
{
unsigned int tickl, tickh;
__asm__ __volatile__("rdtsc":"=a"(tickl),"=d"(tickh));
return ((unsigned long long)tickh << 32)|tickl;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.