mftbu

Move From Timebase Upper

mftbu RT

Reads the upper 32 bits of the Timebase (32-bit implementations).

Encoding

Binary Layout
31
0:5
RT
6:10
269
11:20
371
21:30
/
31
 
Format XFX-form
Opcode 0x7C0002E7
Extension Base

Operands

  • RT
    Target

Example

mftbu r3

Registers Altered

TBU

Related

More in Base

Reference

Description

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.

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.