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 - VEX-ENCODED GPR INSTRUCTIONS<br />

PDEP — Parallel Bits Deposit<br />

Opcode/<strong>Instruction</strong> Op/<br />

En<br />

Description<br />

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

PDEP uses a mask in the second source operand (the third operand) to transfer/scatter contiguous low order bits<br />

in the first source operand (the second operand) into the destination (the first operand). PDEP takes the low bits<br />

from the first source operand and deposit them in the destination operand at the corresponding bit locations that<br />

are set in the second source operand (mask). All other bits (bits not set in mask) in destination are set to zero.<br />

Figure 7-1. PDEP Example<br />

This instruction is not supported in real mode and virtual-8086 mode. The operand size is always 32 bits if not in<br />

64-bit mode. In 64-bit mode operand size 64 requires VEX.W1. VEX.W1 is ignored in non-64-bit modes. An<br />

attempt to execute this instruction with VEX.L not equal to 0 will cause #UD.<br />

Operation<br />

TEMP ← SRC1;<br />

MASK ← SRC2;<br />

DEST ← 0 ;<br />

m← 0, k← 0;<br />

DO WHILE m< OperandSize<br />

IF MASK[ m] = 1 THEN<br />

DEST[ m] ← TEMP[ k];<br />

k ← k+ 1;<br />

FI<br />

m ← m+ 1;<br />

64/32<br />

-bit<br />

Mode<br />

CPUID<br />

Feature<br />

Flag<br />

Description<br />

VEX.NDS.LZ.F2.0F38.W0 F5 /r A V/V BMI2 Parallel deposit of bits from r32b using mask in r/m32, result is written<br />

to r32a.<br />

PDEP r32a, r32b, r/m32<br />

VEX.NDS.LZ.F2.0F38.W1 F5 /r A V/N.E. BMI2 Parallel deposit of bits from r64b using mask in r/m64, result is written<br />

to r64a<br />

PDEP r64a, r64b, r/m64<br />

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

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

SRC1<br />

SRC2<br />

(mask)<br />

DEST<br />

S31 S30 S29 S28 S27 S7 S6 S5 S4 S3 S2 S1 S0 0<br />

0<br />

0 0<br />

bit 31<br />

0<br />

0<br />

1<br />

S 3<br />

0<br />

0<br />

7-14 Ref. # 319433-014<br />

1<br />

S 2<br />

0<br />

0<br />

1<br />

S 1<br />

0<br />

0<br />

0<br />

0<br />

1<br />

S 0<br />

0<br />

0<br />

0<br />

0<br />

bit 0

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

Saved successfully!

Ooh no, something went wrong!