lbzbrx

Load Byte Reversed from Byte Aligned Address Indexed

lbzbrx RT,RA,RB

Loads a byte from memory and reverses its order, placing it into a register.

Details

The lbzbrx instruction loads a byte from the effective address formed by adding the contents of the index register (RB) to the base address in the base register (RA). The byte is then reversed and placed into the target register (RT).

Pseudocode Operation

effective_address <- (RA) + (RB)
RT <- reverse_byte(load_byte(effective_address))

Programming Note

These instructions have the effect of loading and storing data in the opposite byte ordering from that which would be used by other Load and Store instructions. In some implementations, the Load Byte-Reverse instructions may have greater latency than other Load instructions.

Example

lbzbrx r3, r4, r5

Encoding

Binary Layout
18
0
OPCODE
6
RT
10
RA
15
RB
20
MBZ
25
 
Format X-form
Opcode
Extension Base

Operands

  • RT
    Target General Purpose Register
  • RA
    Base General Purpose Register
  • RB
    Index General Purpose Register