2-82
MPC7400 RISC Microprocessor Users Manual
AltiVec UISA Instructions
Table 2-73 describes the unpack instructions.
2.5.5.3 Vector Merge Instructions
Byte vector merge instructions interleave the 8 low bytes (or 8 high bytes) from two source
operands producing a result of 16 bytes. Similarly, half-word vector merge instructions
interleave the 4 low half words (or 4 high half words) of two source operands producing a
result of 8 half words, and word vector merge instructions interleave the 2 low words (or 2
high words) from two source operands producing a result of 4 words. The vector merge
instruction has many uses. For example, it can be used to efTciently transpose SIMD
vectors. Table 2-74 describes the merge instructions.
2.5.5.4 Vector Splat Instructions
When a program needs to perform arithmetic vector operations, the vector splat instructions
can be used in preparation for performing arithmetic for which one source vector is to
consist of elements that all have the same value. Vector splat instructions can be used to
move data where it is required. For example to multiply all elements of a vector register
(VR) by a constant, the vector splat instructions can be used to splat the scalar into the VR.
Likewise, when storing a scalar into an arbitrary memory location, it must be splatted into
a VR, and that VR must be speciTed as the source of the store. This guarantees that the data
appears in all possible positions of that scalar size for the store.
Table 2-73. Vector Unpack Instructions
Name
Mnemonic
Syntax
Vector Unpack High Signed Integer
vupkhsb
vupkhsh
v
D
, v
B
Vector Unpack High Pixel
vupkhpx
v
D
, v
B
Vector Unpack Low Signed Integer
vupklsb
vupklsh
v
D
, v
B
Vector Unpack Low Pixel
vupklpx
v
D
, v
B
Table 2-74. Vector Merge Instructions
Name
Mnemonic
Syntax
Vector Merge High Integer
vmrghb
vmrghh
vmrghw
v
D
, v
A
, v
B
Vector Merge Low Integer
vmrglb
vmrglh
vmrglw
v
D
, v
A
, v
B