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.

INSTRUCTION SET REFERENCE<br />

VPERMQ — Qwords Element Permutation<br />

Opcode/<br />

<strong>Instruction</strong><br />

Description<br />

<strong>Instruction</strong> Operand Encoding<br />

Use two-bit index values in the immediate byte to select a qword element in the source operand, the resultant<br />

qword value from the source operand is copied to the corresponding element of the destination operand in the<br />

order of the index field. Note that this instruction permits a qword in the source operand to be copied to multiple<br />

locations in the destination operand.<br />

An attempt to execute VPERMQ encoded with VEX.L= 0 will cause an #UD exception.<br />

Operation<br />

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

DEST[63:0] (SRC[255:0] >> (IMM8[1:0] * 64))[63:0];<br />

DEST[127:64] (SRC[255:0] >> (IMM8[3:2] * 64))[63:0];<br />

DEST[191:128] (SRC[255:0] >> (IMM8[5:4] * 64))[63:0];<br />

DEST[255:192] (SRC[255:0] >> (IMM8[7:6] * 64))[63:0];<br />

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

VPERMQ: __m256i _mm256_permute4x64_epi64(__m256i a, int control)<br />

SIMD Floating-Point Exceptions<br />

None<br />

Other Exceptions<br />

Op/<br />

En<br />

See Exceptions Type 4; additionally<br />

#UD If VEX.L = 0.<br />

64/32<br />

-bit<br />

Mode<br />

CPUID<br />

Feature<br />

Flag<br />

Description<br />

VEX.256.66.0F3A.W1 00 /r ib A V/V AVX2 Permute qwords in ymm2/m256 using indexes in imm8 and store<br />

the result in ymm1.<br />

VPERMQ ymm1, ymm2/m256,<br />

imm8<br />

Op/En Operand 1 Operand 2 Operand 3 Operand 4<br />

A ModRM:reg (w) ModRM:r/m (r) NA NA<br />

5-188 Ref. # 319433-014

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

Saved successfully!

Ooh no, something went wrong!