Connect with developers and Intel engineers
Hi,
There is rdtsc to read processor time-stamp counter on x64. Could someone tell me how to read time-stamp counter on IA-64 platform.
Thanks,
Victor
unsigned long result;/* gcc-IA64 version */ __asm__ __volatile__("mov %0=ar.itc" : "=r"(result) :: "memory"); while (__builtin_expect ((int) result == -1, 0)) __asm__ __volatile__("mov %0=ar.itc" : "=r"(result) ::"memory"); return result;Not tested on any current IA-64 platform.If you use Microsoft or Intel C++, simply use the __rdtsc() built-in.There is no guarantee of consistent results among nodes of a NUMA platform.
I used Microsoft Visual Studio .NET 2003 compiler and linker to build a UEFI driver. The link failed because of
unresolved external symbol .__rdtsc referenced in function ....
I have searched on web on rdtsc support with IA64 platform before I submitted my original request. What I have found was that there is a AR44 register on IA64 to replace rdtsc call to read the time-stamp count. Is that the case? If so, could you give me a sample code to access that register.
Thanks a lot,
I forgot to mention, I have a #pragma statement
#pragma intrinsic(__rdtsc)
and my calling function is
ts_expire = __rdtsc() + (u64_t)(cnt) * cycle_per_us;
and this leads to the unresolved external symbol .__rdtsc.