mftbu
Move From Timebase Upper
mftbu RT
Reads the upper 32 bits of the Timebase (32-bit implementations).
Details
Reads the upper 32 bits of the Timebase register and places the value into the target GPR. This instruction is primarily used in 32-bit implementations to obtain the high word of the 64-bit Timebase. It does not modify condition registers or status fields.
Pseudocode Operation
RT ← TBU
// TBU is the upper 32 bits of the 64-bit Timebase counter
Programming Note
Use mftbu to capture the high-order bits of the timebase for timestamping or performance measurement. Ensure that your application accounts for potential discrepancies between the upper and lower 32-bit reads due to timebase overflow.
Example
mftbu r3
Encoding
Binary Layout
31
0
RT
6
269
11
371
21
/
31
Operands
-
RT
Target