plwz

Prefixed Load Word and Zero

plwz RT, D34(RA), R

Loads a 32-bit word and zero-extends it to 64 bits, using a 34-bit offset.

Details

Loads a 32-bit word from memory at the address calculated from RA plus a 34-bit immediate displacement, zero-extends it to 64 bits, and stores the result in RT. When R=1, the displacement is PC-relative; when R=0, it is treated as absolute. This is a 64-bit prefixed instruction from the Prefixed extension.

Pseudocode Operation

if R = 1 then
  EA ← (RA | 0 if RA=0) + sign_extend(D34, 34) + CIA
else
  EA ← (RA | 0 if RA=0) + sign_extend(D34, 34)
RT ← zero_extend([EA]0:31, 64)

Programming Note

Use plwz when loading a word from memory into a 64-bit register with zero extension. Ensure the EA (Effective Address) is correctly calculated using the prefix and suffix fields. This instruction operates at user privilege level.

Example

plwz r3, 0(r4), 0

// Load word with large offset.

Encoding

Binary Layout
1
0
2
6
R
8
0
9
D0
14
34
32
RT
38
RA
43
D1
48
 
Format MLS:D-form
Opcode 0x0600000080000000
Extension Prefixed

Operands

  • RT
    Target Register
  • D34
    34-bit Displacement
  • RA
    Base Register