plwz
Prefixed Load Word and Zero
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
// Load word with large offset.
Encoding
Operands
-
RT
Target Register -
D34
34-bit Displacement -
RA
Base Register