Could anybody help me in identifying reason for the below compiler error.
"..\TestRT\TDP\PPCGNU\lib\custom.h:428: error: impossible constraint in ‘asm’"
Thanks in advance!
Could anybody help me in identifying reason for the below compiler error.
"..\TestRT\TDP\PPCGNU\lib\custom.h:428: error: impossible constraint in ‘asm’"
Thanks in advance!
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;
}