03.03.2013 Views

Intel® Architecture Instruction Set Extensions Programming Reference

Intel® Architecture Instruction Set Extensions Programming Reference

Intel® Architecture Instruction Set Extensions Programming Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

INSTRUCTION SET REFERENCE<br />

Legacy SSE instructions: In 64-bit mode using a REX prefix in the form of REX.R permits this instruction to access<br />

additional registers (XMM8-XMM15).<br />

128-bit Legacy SSE version: Bits (255:128) of the corresponding YMM destination register remain unchanged.<br />

VEX.128 encoded version: Bits (255:128) of the corresponding YMM register are zeroed.<br />

VEX.256 encoded version: Bits (255:128) of the destination stores the shuffled results of the upper 16 bytes of the<br />

source operand using the immediate byte as the order operand.<br />

Note: In VEX encoded versions VEX.vvvv is reserved and must be 1111b otherwise instructions will #UD.<br />

Operation<br />

VPSHUFD (VEX.256 encoded version)<br />

DEST[31:0] (SRC[127:0] >> (ORDER[1:0] * 32))[31:0];<br />

DEST[63:32] (SRC[127:0] >> (ORDER[3:2] * 32))[31:0];<br />

DEST[95:64] (SRC[127:0] >> (ORDER[5:4] * 32))[31:0];<br />

DEST[127:96] (SRC[127:0] >> (ORDER[7:6] * 32))[31:0];<br />

DEST[159:128] (SRC[255:128] >> (ORDER[1:0] * 32))[31:0];<br />

DEST[191:160] (SRC[255:128] >> (ORDER[3:2] * 32))[31:0];<br />

DEST[223:192] (SRC[255:128] >> (ORDER[5:4] * 32))[31:0];<br />

DEST[255:224] (SRC[255:128] >> (ORDER[7:6] * 32))[31:0];<br />

VPSHUFD (VEX.128 encoded version)<br />

DEST[31:0] (SRC[127:0] >> (ORDER[1:0] * 32))[31:0];<br />

DEST[63:32] (SRC[127:0] >> (ORDER[3:2] * 32))[31:0];<br />

DEST[95:64] (SRC[127:0] >> (ORDER[5:4] * 32))[31:0];<br />

DEST[127:96] (SRC[127:0] >> (ORDER[7:6] * 32))[31:0];<br />

DEST[VLMAX:128] 0<br />

PSHUFD (128-bit Legacy SSE version)<br />

DEST[31:0] (SRC[255:128] >> (ORDER[1:0] * 32))[31:0];<br />

DEST[63:32] (SRC[255:128] >> (ORDER[3:2] * 32))[31:0];<br />

DEST[95:64] (SRC[255:128] >> (ORDER[5:4] * 32))[31:0];<br />

DEST[127:96] (SRC[255:128] >> (ORDER[7:6] * 32))[31:0];<br />

DEST[VLMAX:128] (Unmodified)<br />

Intel C/C++ Compiler Intrinsic Equivalent<br />

(V)PSHUFD: __m128i _mm_shuffle_epi32(__m128i a, const int n)<br />

VPSHUFD: __m256i _mm256_shuffle_epi32(__m256i a, const int n)<br />

SIMD Floating-Point Exceptions<br />

None<br />

Other Exceptions<br />

See Exceptions Type 4<br />

Ref. # 319433-014 5-123

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!