[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Assembler Language Reference

lwzux or lux (Load Word and Zero with Update Indexed) Instruction

Purpose

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.

Syntax

PowerPC
lwzux RT,RA,RB
POWER
lux RT,RA,RB

Description

The lwzux and lux instructions load a word of data 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 GPR RB. If GPR RA is 0, then the EA is the contents of GPR RB.

If GPR 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 lwzux and lux instructions have one syntax form and do not affect the Fixed-Point Exception Register or Condition Register Field 0.

Parameters

RT Specifies target general-purpose register where result of operation is stored.
RA Specifies source general-purpose register for EA calculation and possible address update.
RB Specifies source general-purpose register for EA calculation.

Examples

The following code loads a word from memory into GPR 6 and places the effective address in GPR 5:

.csect data[rw]
storage: .long 0xffdd 75ce
# Assume GPR 5 contains the address of csect data[rw].
# Assume GPR 4 contains the displacement of storage
# relative to csect data[rw].
.csect text[pr]
lwzux 6,5,4
# GPR 6 now contains 0xffdd 75ce.
# GPR 5 now contains the storage address.

Related Information

Fixed-Point Processor.

Fixed-Point Load and Store with Update Instructions.


[ Previous | Next | Contents | Home | Search ]