pext

Parallel Bits Extract

PEXT r32, r32, r/m32

Extracts bits from source using mask and packs them to LSB.

Details

The Parallel Bits Extract instruction extracts bits from source using mask and packs them to LSB.

Pseudocode Operation

// Extracts bits from source using mask and packs them to LSB

Example

PEXT eax, eax, ebx

Encoding

Binary Layout
VEX
+0
opcode
+3
ModRM
+4
 
Format VEX
Opcode C4 ... F5
Extension BMI2

Operands

  • dest
    32-bit general-purpose register (e.g. EAX)
  • src1
    32-bit general-purpose register (e.g. EAX)
  • src2
    32-bit register or memory