lwa
Load Word Algebraic
Loads a word (32 bits) from memory and sign-extends it to 64 bits.
Details
The lwz instruction loads a word from memory into the specified target register (RT), zeroing out the upper 32 bits of RT. The effective address is calculated by adding the displacement (D) to the base address in register RA, or using the value 0 if RA is 0.
Pseudocode Operation
RT <- EXTS(MEM(EA, 4))
Programming Note
The lwa instruction is commonly used for loading a 32-bit word from memory into a target register while zeroing out the upper 32 bits. Ensure that the base address in RA and displacement D are correctly aligned to avoid alignment faults. This instruction operates at user privilege level and will raise an exception if the effective address is invalid or if there is a protection fault.
Example
Encoding
Operands
-
RT
Target Register -
DS
Displacement (Aligned) -
RA
Base Register