Loads a word of data from a specified location in memory into a general-purpose register and possibly places the effective address in a second general-purpose register.
The lwzu and lu instructions load a word in storage from a specified location in memory addressed by the effective address (EA) into the target general-purpose register (GPR) RT.
If GPR RA is not 0, the EA is the sum of the contents of GPR RA and D, a 16-bit, signed two's complement integer sign-extended to 32 bits. If GPR RA is 0, then the EA is D.
If RA does not equal RT and RA does not equal 0, and the storage access does not cause an Alignment interrupt or a Data Storage interrupt, then the EA is placed into GPR RA.
The lwzu and lu instructions have one syntax form and do not affect the Fixed-Point Exception Register or Condition Register Field 0.
|RT||Specifies target general-purpose register where result of operation is stored.|
|D||Specifies a 16-bit, signed two's complement integer sign-extended to 32 bits for EA calculation.|
|RA||Specifies source general-purpose register for EA calculation and possible address update.|
The following code loads a word from memory into GPR 6 and places the effective address in GPR 4:
.csect data[rw] storage: .long 0xffdd 75ce .csect text[pr] # Assume GPR 4 contains address of csect data[rw]. lwzu 6,storage(4) # GPR 6 now contains 0xffdd 75ce. # GPR 4 now contains the storage address.
Fixed-Point Load and Store with Update Instructions.