PSHUFD—Shuffle Packed DoublewordsInstruction Operand EncodingDescriptionCopies doublewords from source operand (second operand) and inserts them in the destination operand (first operand) at the locations selected with the order operand (third operand). Figure 4-16 shows the operation of the 256-bit VPSHUFD instruction and the encoding of the order operand. Each 2-bit field in the order operand selects the contents of one doubleword location within a 128-bit lane and copy to the target element in the destination operand. For example, bits 0 and 1 of the order operand targets the first doubleword element in the low and high 128-bit lane of the destination operand for 256-bit VPSHUFD. The encoded value of bits 1:0 of the order operand (see the field encoding in Figure 4-16) determines which doubleword element (from the respective 128-bit lane) of the source operand will be copied to doubleword 0 of the destination operand. For 128-bit operation, only the low 128-bit lane are operative. The source operand can be an XMM register or a 128-bit memory location. The destination operand is an XMM register. The order operand is an 8-bit immediate. Note that this instruction permits a doubleword in the source operand to be copied to more than one doubleword location in the destination operand.Opcode/InstructionOp/ En64/32 bit Mode SupportCPUID Feature FlagDescription66 0F 70 /r ibPSHUFD xmm1, xmm2/m128, imm8AV/V SSE2Shuffle the doublewords in xmm2/m128 based on the encoding in imm8 and store the result in xmm1.VEX.128.66.0F.WIG 70 /r ibVPSHUFD xmm1, xmm2/m128, imm8AV/VAVXShuffle the doublewords in xmm2/m128 based on the encoding in imm8 and store the result in xmm1.VEX.256.66.0F.WIG 70 /r ibVPSHUFD ymm1, ymm2/m256, imm8AV/VAVX2Shuffle the doublewords in ymm2/m256 based on the encoding in imm8 and store the result in ymm1.EVEX.128.66.0F.W0 70 /r ibVPSHUFD xmm1 {k1}{z}, xmm2/m128/m32bcst, imm8BV/VAVX512VLAVX512FShuffle the doublewords in xmm2/m128/m32bcst based on the encoding in imm8 and store the result in xmm1 using writemask k1.EVEX.256.66.0F.W0 70 /r ibVPSHUFD ymm1 {k1}{z}, ymm2/m256/m32bcst, imm8BV/VAVX512VLAVX512FShuffle the doublewords in ymm2/m256/m32bcst based on the encoding in imm8 and store the result in ymm1 using writemask k1.EVEX.512.66.0F.W0 70 /r ibVPSHUFD zmm1 {k1}{z}, zmm2/m512/m32bcst, imm8BV/VAVX512FShuffle the doublewords in zmm2/m512/m32bcst based on the encoding in imm8 and store the result in zmm1 using writemask k1.Op/EnTuple TypeOperand 1Operand 2Operand 3Operand 4ANAModRM:reg (w)ModRM:r/m (r)imm8NABFullModRM:reg (w)ModRM:r/m (r)Imm8NA
This UNOFFICIAL reference was generated from the official Intel® 64 and IA-32 Architectures Software Developer’s Manual by a dumb script. There is no guarantee that some parts aren't mangled or broken and is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.