Extract Packed Single-Precision Floating-Point Values

Encoding

EncodingOperand 1Operand 2Operand 3Operand 4
rmin/aModRM.reg[w]ModRM.r/m[r]imm8
ermituple1-scalarModRM.reg[w]ModRM.r/m[r]imm8

Description

The (V)EXTRACTPS instruction extracts a single-precision floating-point value from the source operand. The selected value is indicated by the bits 0..1 in the immediate (the other bits are ignored). The extracted value is stored in the destination operand.

Operation

public void EXTRACTPS(ref U32 dest, SimdU32 src, byte imm8)
{
    dest = src[imm8 & 3];
}

public void VEXTRACTPS_Vex(ref U32 dest, SimdU32 src, byte imm8) =>
    EXTRACTPS(ref dest, src, imm8);

public void VEXTRACTPS_Evex(ref U32 dest, SimdU32 src, byte imm8) =>
    EXTRACTPS(ref dest, src, imm8);

Intrinsics

Exceptions

SIMD Floating-Point

None.

Other Exceptions

VEX Encoded Form: See Type 5 Exception Conditions.
EVEX Encoded Form: See Type E9NF Exception Conditions.

#UD
  • If VEX.L is not 0.
  • If EVEX.LL is not 00b.
  • If VEX.vvvv is not 1111b.
  • If EVEX.vvvvv is not 11111b.