blob: d07aafec7f1e8582da411365a9a6309da3463ec5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include <stdio.h>
#include <sys/types.h>
#include "osfreq.c"
long long cpucycles_sparccpuinfo(void)
{
long long result;
asm volatile("rd %%tick,%0" : "=r" (result));
return result;
}
long long cpucycles_sparccpuinfo_persecond(void)
{
return osfreq();
}
|