User Guide
144 128-Bit Media and Scientific Programming
AMD64 Technology 24592—Rev. 3.15—November 2009
Figure 4-22. PINSRW Operation
Shuffle. These instructions reorder the elements of a vector.
• PSHUFD—Packed Shuffle Doublewords
• PSHUFHW—Packed Shuffle High Words
• PSHUFLW—Packed Shuffle Low Words
The PSHUFD instruction fills each doubleword of the first operand (an XMM register) by copying any
one of the doublewords in the second operand (an XMM register or 128-bit memory location). The
ordering of the shuffle can occur in one of 256 possible ways, as specified by the third operand, an
immediate byte. Figure 4-23 on page 145 shows one of the 256 possible shuffle operations.
513-166.eps
xmm
result
127 0
reg32/64/mem16
127 0
15 0
select word position for insert
imm8