5 typedef unsigned long long int ULong
;
6 typedef unsigned int UInt
;
8 static ULong
GetCPU_ClockCyclesSinceStartup(void)
13 __asm__
__volatile__("1: mfspr %0,269\n\t"
18 : "=r" (uTimeBaseHigh
),
22 : /*trash*/ "cr0","cr7" );
24 return (((ULong
)(uTimeBaseHigh
) << 32) | uTimeBaseLow
);
27 int main(int argc
, char** argv
)
29 ULong cys
= GetCPU_ClockCyclesSinceStartup();
30 /* implausible that machine has been up less than 4G cycles */
31 assert(cys
> (1ULL << 32));