
MOTOROLA
Chapter 2. Programming Model
2-33
2.3.4.3.7 Integer Load and Store String Instructions
The integer load and store string instructions allow movement of data from memory to
registers or from registers to memory without concern for alignment. These instructions can
be used for a short move between arbitrary memory locations or to initiate a long move
between misaligned memory fields.
When the 603e is operating with little-endian byte order, execution of a load or store string
instruction causes the system alignment error handler to be invoked; see “Byte Ordering”
in Chapter 3, “Operand Conventions,” in
The Programming Environments Manual
for more
information.
Table 2-24 lists the integer load and store string instructions.
Load string and store string instructions may involve operands that are not word-aligned.
As described in “Alignment Exception (0x00600)” in Chapter 6, “Exceptions,” in
The
Programming Environments Manual,
a misaligned string operation suffers a performance
penalty compared to a word-aligned operation of the same type.
When a string operation crosses a 4-Kbyte boundary, the instruction may be interrupted by
a DSI exception associated with the address translation of the second page. In this case, the
603e performs some or all memory references from the first page and none from the second
before taking the exception. On return from the DSI exception, the load or store string
instruction will re-execute from the beginning. For more information, refer to “DSI
Exception (0x00300)” in Chapter 6, “Exceptions,” in
The Programming Environments
Manual
.
Implementation Note
—If
r
A is in the range of registers to be loaded for a Load String
Word Immediate (
lswi
) instruction or if either
r
A or
r
B is in the range of registers to be
loaded for a Load String Word Indexed (
lswx
) instruction, the PowerPC architecture defines
the instruction to be of an invalid form. In addition, the
lswx
and
stswx
instructions that
specify a string length of zero are defined to be invalid by the PowerPC architecture.
However, neither of these cases holds true for the 603e which treats these cases as valid
forms.
Table 2-24. Integer Load and Store String Instructions
Name
Mnemonic
Operand Syntax
Load String Word Immediate
lswi
r
D
,r
A
,
NB
Load String Word Indexed
lswx
r
D
,r
A
,r
B
Store String Word Immediate
stswi
r
S
,r
A
,
NB
Store String Word Indexed
stswx
r
S
,r
A
,r
B