1
0

ia64cpuinfo.c 262 B

123456789101112131415
  1. #include <stdio.h>
  2. #include <sys/types.h>
  3. #include "osfreq.c"
  4. long long cpucycles_ia64cpuinfo(void)
  5. {
  6. long long result;
  7. asm volatile("mov %0=ar.itc" : "=r"(result));
  8. return result;
  9. }
  10. long long cpucycles_ia64cpuinfo_persecond(void)
  11. {
  12. return osfreq();
  13. }