Opcode | Encoding | 16-bit | 32-bit | 64-bit | CPUID Feature Flag(s) | Description |
---|---|---|---|---|---|---|
66 0F 3A 17 /r ib EXTRACTPS r/m32, xmm1, imm8 | rmi | Invalid | Valid | Valid | sse4.1 | Extract a packed single-precision floating-point value from xmm1 located at offset imm8. Store the result in r/m32. |
VEX.128.66.0F3A.WIG 17 /r ib VEXTRACTPS r/m32, xmm1, imm8 | rmi | Invalid | Valid | Valid | avx | Extract a packed single-precision floating-point value from xmm1 located at offset imm8. Store the result in r/m32. |
EVEX.128.66.0F3A.WIG 17 /r ib VEXTRACTPS r/m32, xmm1, imm8 | ermi | Invalid | Valid | Valid | avx | Extract a packed single-precision floating-point value from xmm1 located at offset imm8. Store the result in r/m32. |
Encoding
Encoding | Operand 1 | Operand 2 | Operand 3 | Operand 4 |
---|---|---|---|---|
rmi | n/a | ModRM.reg[w] | ModRM.r/m[r] | imm8 |
ermi | tuple1-scalar | ModRM.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
int32_t _mm_extract_ps (__m128 a, const int idx)
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 not0
. - If
EVEX.LL
is not00b
. - If
VEX.vvvv
is not1111b
. - If
EVEX.vvvvv
is not11111b
.