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

lswi or lsi (Load String Word Immediate) Instruction

Purpose

Loads consecutive bytes in storage from a specified location in memory into consecutive general-purpose registers.

Syntax

PowerPC
lswi RT,RA,NB
POWER
lsi RT,RA,NB

Description

The lswi and lsi instructions load N consecutive bytes in storage addressed by the effective address (EA) into general-purpose register GPR RT, starting with the leftmost byte, through GPR RT+NR-1, and wrapping around back through GPR 0, if required.

If GPR RA is not 0, the EA is the contents of GPR RA. If GPR RA is 0, then the EA is 0.

Consider the following when using the lswi and lsi instructions:

For the PowerPC instruction lswi, if GPR RA is in the range of registers to be loaded or RT = RA = 0, the instruction form is invalid.

Consider the following when using the POWER instruction lsi:

The lswi and lsi instructions have one syntax form which does not affect the Fixed-Point Exception Register or Condition Register Field 0.

Note: The lswi and lsi instructions can be interrupted by a Data Storage interrupt. When such an interrupt occurs, the instruction is restarted from the beginning.

Parameters

RT Specifies starting general-purpose register of stored data.
RA Specifies general-purpose register for EA calculation.
NB Specifies byte count.

Examples

The following code loads the bytes contained in a location in memory addressed by GPR 7 into GPR 6:

.csect data[rw]
.string "Hello, World"
# Assume GPR 7 contains the address of csect data[rw].
.csect text[pr]
lswi 6,7,0x6
# GPR 6 now contains 0x4865 6c6c.

Related Information

Fixed-Point Processor.

Fixed-Point String Instructions.


[ Previous | Next | Contents | Home | Search ]