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.

Encoding

Binary Layout
1
0:5
2
6:7
R
8
0
9:13
D0
14:31
34
32:37
RT
38:42
RA
43:47
D1
48:63
 
Format MLS:D-form
Opcode 0x0600000080000000
Extension Prefixed

Operands

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

Example

plwz r3, 0(r4), 0

// Load word with large offset.

Related

More in Prefixed

Reference

Description

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.

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.