22 unsigned int tbl, tbu0, tbu1;
25 __asm__ __volatile__ (
"mftbu %0" :
"=r"(tbu0));
26 __asm__ __volatile__ (
"mftb %0" :
"=r"(tbl));
27 __asm__ __volatile__ (
"mftbu %0" :
"=r"(tbu1));
28 }
while (tbu0 != tbu1);
30 return (((
unsigned long long)tbu0) << 32) | tbl;
static const tw_optdef clock_opts[]
unsigned long long g_tw_clock_rate
#define TWOPT_ULONGLONG(n, v, h)
tw_clock tw_clock_now(tw_pe *me)
const tw_optdef * tw_clock_setup(void)
void tw_clock_init(tw_pe *me)
tw_clock tw_clock_read(void)
Holds the entire PE state.
tw_clock clock_offset
Initial clock value for this PE.
tw_clock clock_time
Most recent clock value for this PE.