2-80
MPC7400 RISC Microprocessor Users Manual
AltiVec UISA Instructions
2.5.3.2 Vector Load Instructions Supporting Alignment
The
lvsl
and
lvsr
instructions can be used to create the permute control vector to be used
by a subsequent
vperm
instruction. Let X and Y be the contents of
v
A and
v
B specified by
vperm
. The control vector created by
lvsl
causes the
vperm
to select the high-order 16
bytes of the result of shifting the 32-byte value X || Y left by sh bytes (sh = the value in
EA[60D63]). The control vector created by
lvsr
causes the
vperm
to select the low-order
16 bytes of the result of shifting X || Y right by sh bytes.
Table 2-70 summarizes the vector alignment instructions.
2.5.3.3 Vector Store Instructions
For vector store instructions, the contents of the VR used as a source (
v
S) are stored into
the byte, half word, word or quad word in memory addressed by the effective address (EA).
Table 2-71 provides a summary of the vector store instructions.
2.5.4 Control Flow
AltiVec instructions can be freely intermixed with existing PowerPC instructions to form a
complete program. AltiVec instructions provide a vector compare and select mechanism to
implement conditional execution as the preferred mechanism to control data ow in AltiVec
programs. In addition, AltiVec vector compare instructions can update the condition
register thus providing the communication from AltiVec execution units to PowerPC
branch instructions necessary to modify program ow based on vector data.
2.5.5 Vector Permutation and Formatting Instructions
Vector pack, unpack, merge, splat, permute, and select can be used to accelerate various
vector math operations and vector formatting. Details of these instructions follow.
Table 2-70. Vector Load Instructions Supporting Alignment
Name
Mnemonic
Syntax
Load Vector for Shift Left
lvsl
v
D
,r
A
,r
B
Load Vector for Shift Right
lvsr
v
D
,r
A
,r
B
Table 2-71. Vector Integer Store Instructions
Name
Mnemonic
Syntax
Store Vector Element Integer Indexed
svetbx
svethx
svetwx
v
S
,r
A
,r
B
Store Vector Element Indexed
stvx
v
S
,r
A
,r
B
Store Vector Element Indexed LRU
1
1
On the MPC7400,
lvxl
,
stvxl
are interpreted to be transient. See Section 7.1.2.5,
òStatic/Transient Data Stream Touch Instructions.ó
stvxl
v
S
,r
A
,r
B