PowerPC includes a “time base” register, which is regularly increasing (although perhaps not at every clock cycle - it depends on the actual hardware and operating system). The TB register is a 64-bit value, read as two 32-bit halves with mftb (the lower half) and mftbu (the upper half). The four least significant TB bits are somewhat unreliable (they increase monotonously, but not necessarily at a fixed rate).
Some older PowerPC processors do not have a TB register (but the OS can emulate it, probably with dubious accuracy); however, the 603e already has one, so it’s arguable that most, if not all PowerPC systems actually in production have one. There is also a “temporary base register”.
See the Power ISA specification available on power.org for details . At the time of this writing, the current version was 2.06B, and the TB register and operation codes were documented on pages 703 through 706.
source share