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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}<br />

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

for i = 0 to 15 {<br />

if (SRC2[(i * 8)+7] == 1 ) then<br />

DEST[(i*8)+7..(i*8)+0] 0;<br />

else<br />

index[3..0] SRC2[(i*8)+3 .. (i*8)+0];<br />

DEST[(i*8)+7..(i*8)+0] SRC1[(index*8+7)..(index*8+0)];<br />

endif<br />

}<br />

DEST[VLMAX:128] 0<br />

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

for i = 0 to 15 {<br />

if (SRC[(i * 8)+7] == 1 ) then<br />

DEST[(i*8)+7..(i*8)+0] 0;<br />

else<br />

index[3..0] SRC[(i*8)+3 .. (i*8)+0];<br />

DEST[(i*8)+7..(i*8)+0] DEST[(index*8+7)..(index*8+0)];<br />

endif<br />

}<br />

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

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

(V)PSHUFB: __m128i _mm_shuffle_epi8(__m128i a, __m128i b)<br />

VPSHUFB: __m256i _mm256_shuffle_epi8(__m256i a, __m256i b)<br />

SIMD Floating-Point Exceptions<br />

None<br />

Other Exceptions<br />

See Exceptions Type 4<br />

INSTRUCTION SET REFERENCE<br />

Ref. # 319433-014 5-121

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

Saved successfully!

Ooh no, something went wrong!