1
0

sparc32cpuinfo.c 338 B

12345678910111213141516
  1. #include <stdio.h>
  2. #include <sys/types.h>
  3. #include "osfreq.c"
  4. long long cpucycles_sparc32cpuinfo(void)
  5. {
  6. long long result;
  7. asm volatile(".word 2202075136; .word 2570088480; srl %%g1,0,%L0; mov %%o4,%H0"
  8. : "=r" (result) : : "g1","o4");
  9. return result;
  10. }
  11. long long cpucycles_sparc32cpuinfo_persecond(void)
  12. {
  13. return osfreq();
  14. }