Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Лаб2012 / 319433-011.pdf
Скачиваний:
27
Добавлен:
02.02.2015
Размер:
2.31 Mб
Скачать

INSTRUCTION SET REFERENCE

VPERMD - Full Doublewords Element Permutation

Opcode/

Op/

64/32

CPUID

Description

Instruction

En

-bit

Feature

 

 

 

Mode

Flag

 

VEX.NDS.256.66.0F38.W0 36 /r

A

V/V

AVX2

Permute doublewords in

VPERMD ymm1, ymm2,

 

 

 

ymm3/m256 using indexes in

ymm3/m256

 

 

 

ymm2 and store the result in

 

 

 

 

ymm1.

Instruction Operand Encoding

Op/En

Operand 1

Operand 2

Operand 3

Operand 4

A

ModRM:reg (w)

VEX.vvvv

ModRM:r/m (r)

NA

 

 

 

 

 

Description

Use the index values in each dword element of the first source operand (the second operand) to select a dword element in the second source operand (the third operand), the resultant dword value from the second source operand is copied to the destination operand (the first operand) in the corresponding position of the index element. Note that this instruction permits a doubleword in the source operand to be copied to more than one doubleword location in the destination operand.

An attempt to execute VPERMD encoded with VEX.L= 0 will cause an #UD exception.

Operation

VPERMD (VEX.256 encoded version)

DEST[31:0] (SRC2[255:0] >> (SRC1[2:0] * 32))[31:0];

DEST[63:32] (SRC2[255:0] >> (SRC1[34:32] * 32))[31:0];

DEST[95:64] (SRC2[255:0] >> (SRC1[66:64] * 32))[31:0];

DEST[127:96] (SRC2[255:0] >> (SRC1[98:96] * 32))[31:0];

DEST[159:128] (SRC2[255:0] >> (SRC1[130:128] * 32))[31:0];

DEST[191:160] (SRC2[255:0] >> (SRC1[162:160] * 32))[31:0];

DEST[223:192] (SRC2[255:0] >> (SRC1[194:192] * 32))[31:0];

DEST[255:224] (SRC2[255:0] >> (SRC1[226:224] * 32))[31:0];

Intel C/C++ Compiler Intrinsic Equivalent

VPERMD __m256i _mm256_permutevar8x32_epi32(__m256i a, __m256i offsets);

SIMD Floating-Point Exceptions

None

5-234

Ref. # 319433-011

INSTRUCTION SET REFERENCE

Other Exceptions

See Exceptions Type 4; additionally

#UD

If VEX.L = 0 for VPERMD,

 

If VEX.W = 1.

Ref. # 319433-011

5-235

INSTRUCTION SET REFERENCE

VPERMPD - Permute Double-Precision Floating-Point Elements

Opcode/

Op/

64/32

CPUID

Description

Instruction

En

-bit

Feature

 

 

 

Mode

Flag

 

VEX.256.66.0F3A.W1 01 /r ib

A

V/V

AVX2

Permute double-precision float-

VPERMPD ymm1, ymm2/m256,

 

 

 

ing-point elements in

imm8

 

 

 

ymm2/m256 using indexes in

 

 

 

 

imm8 and store the result in

 

 

 

 

ymm1.

 

 

 

 

 

Instruction Operand Encoding

Op/En

Operand 1

Operand 2

Operand 3

Operand 4

A

ModRM:reg (w)

ModRM:r/m (r)

NA

NA

 

 

 

 

 

Description

Use two-bit index values in the immediate byte to select a double-precision floatingpoint element in the source operand; the resultant data from the source operand is copied to the corresponding element of the destination operand in the order of the index field. Note that this instruction permits a qword in the source operand to be copied to multiple location in the destination operand.

An attempt to execute VPERMPD encoded with VEX.L= 0 will cause an #UD exception.

Operation

VPERMPD (VEX.256 encoded version)

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

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

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

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

Intel C/C++ Compiler Intrinsic Equivalent

VPERMPD __m256d _mm256_permute4x64_pd(__m256d a, int control) ;

SIMD Floating-Point Exceptions

None

Other Exceptions

See Exceptions Type 4; additionally

#UD

If VEX.L = 0.

5-236

Ref. # 319433-011

INSTRUCTION SET REFERENCE

VPERMPS - Permute Single-Precision Floating-Point Elements

Opcode/

Op/

64/32

CPUID

Description

Instruction

En

-bit

Feature

 

 

 

Mode

Flag

 

VEX.NDS.256.66.0F38.W0 16 /r

A

V/V

AVX2

Permute single-precision

VPERMPS ymm1, ymm2,

 

 

 

floating-point elements in

ymm3/m256

 

 

 

ymm3/m256 using indexes in

 

 

 

 

ymm2 and store the result in

 

 

 

 

ymm1.

 

 

 

 

 

Instruction Operand Encoding

Op/En

Operand 1

Operand 2

Operand 3

Operand 4

A

ModRM:reg (w)

VEX.vvvv

ModRM:r/m (r)

NA

 

 

 

 

 

Description

Use the index values in each dword element of the first source operand (the second operand) to select a single-precision floating-point element in the second source operand (the third operand), the resultant data from the second source operand is copied to the destination operand (the first operand) in the corresponding position of the index element. Note that this instruction permits a doubleword in the source operand to be copied to more than one doubleword location in the destination operand.

An attempt to execute VPERMPS encoded with VEX.L= 0 will cause an #UD exception.

Operation

VPERMPS (VEX.256 encoded version)

DEST[31:0] (SRC2[255:0] >> (SRC1[2:0] * 32))[31:0];

DEST[63:32] (SRC2[255:0] >> (SRC1[34:32] * 32))[31:0];

DEST[95:64] (SRC2[255:0] >> (SRC1[66:64] * 32))[31:0];

DEST[127:96] (SRC2[255:0] >> (SRC1[98:96] * 32))[31:0];

DEST[159:128] (SRC2[255:0] >> (SRC1[130:128] * 32))[31:0];

DEST[191:160] (SRC2[255:0] >> (SRC1[162:160] * 32))[31:0];

DEST[223:192] (SRC2[255:0] >> (SRC1[194:192] * 32))[31:0];

DEST[255:224] (SRC2[255:0] >> (SRC1[226:224] * 32))[31:0];

Intel C/C++ Compiler Intrinsic Equivalent

VPERMPS __m256 _mm256_permutevar8x32_ps(__m256 a, __m256 offsets)

SIMD Floating-Point Exceptions

None

Ref. # 319433-011

5-237

INSTRUCTION SET REFERENCE

Other Exceptions

See Exceptions Type 4; additionally

#UD

If VEX.L = 0,

 

If VEX.W = 1.

5-238

Ref. # 319433-011

Соседние файлы в папке Лаб2012