Introduction
AVX-512 widens the vector registers to 512 bits, doubles their number to 32, and adds eight mask registers that let almost every instruction work on only some of its elements. Its instructions are written with a new prefix, EVEX. The Foundation set, AVX-512 F, holds the core: the floating-point and 32-bit and 64-bit integer operations, loads and stores, shuffles, conversions, gathers and scatters. Every processor with AVX-512 has it. The other sets build on it: the mask register instructions, BW, DQ and CD, the later extensions and FP16.
The sections below explain the parts of AVX-512 that every one of those pages uses.
The registers
- zmm0 to zmm31 are 512 bits wide. The low 256 bits of each are a ymm register and the low 128 bits an xmm register, so ymm16 to ymm31 and xmm16 to xmm31 are new as well; only EVEX instructions can name them. Outside 64-bit mode only zmm0 to zmm7 can be named.
- An EVEX or VEX instruction that writes an xmm or ymm register clears the rest of its zmm register, up to bit 511.
- k0 to k7 are the opmask registers, 64 bits each. Bit i of a mask belongs to element i of a vector. They are described, with the instructions that work on them, on the mask registers page.
- The state is saved by XSAVE as three components: 5 (k0 to k7), 6 (the upper 256 bits of zmm0 to zmm15) and 7 (zmm16 to zmm31).
The EVEX prefix
EVEX is four bytes: 62 and three payload bytes, then the opcode, the
ModRM byte and the rest, as in any instruction. Outside 64-bit mode, 62 is BOUND; it is
read as EVEX when the next byte’s top two bits are 11, which as a ModRM byte would be a
register operand that BOUND cannot take. The full layout is on the
instruction encoding page. In short:
| Byte | Bits 7 to 0 | What they hold |
|---|---|---|
| P0 | R X B R′ 0 m m m | The extensions of the ModRM and SIB register fields (inverted; R′ is the fifth bit of ModRM.reg), a 0 (which APX uses), and the opcode map: 1 (0F), 2 (0F 38), 3 (0F 3A), and 5 and 6 for FP16. |
| P1 | W v v v v 1 p p | W, which usually picks 32-bit or 64-bit elements; vvvv, the extra source register (inverted); and pp, the implied prefix (none, 66, F3, F2). |
| P2 | z L′ L b V′ a a a | z, zeroing; L′L, the vector length; b, broadcast or rounding; V′, the fifth bit of vvvv (inverted); aaa, the mask register. |
In Intel’s notation an EVEX encoding is written like EVEX.512.66.0F38.W0 58 /r:
the vector length, the implied prefix, the map, the W bit, the opcode and how ModRM is
used. LLIG means the length is ignored (scalars) and WIG that W is
ignored.
Masking and zeroing
- EVEX.aaa names the mask, k1 to k7, written
{k1}after the destination. 000 means no mask: every element is written. So k0 cannot be a write mask. - An element whose mask bit is 0 is not computed. It raises no floating-point exception, and a memory fault in it is suppressed.
- Merging (EVEX.z = 0) leaves such an element of the destination as
it was. Zeroing (EVEX.z = 1), written
{z}, clears it. - A store to memory can only merge: the masked-off elements of memory are not written, and {z} is not allowed.
- A compare writes a mask, and its
{k2}is ANDed into the result: bits whose k2 bit is 0 are cleared. - Gathers and scatters must have a mask other than k0, and clear its bits as the elements are done.
Embedded broadcast
On an instruction whose last source may be in memory, EVEX.b = 1 with a memory operand
reads one element and repeats it across the vector. Intel writes the operand as
m32bcst or m64bcst; LLVM shows it as
dword ptr [rax]{1to16}. A zmm register holds 16 dwords or 8 qwords, so the
forms are {1to16} and {1to8}, and {1to4} or {1to2} with AVX512VL. Only instructions of
the full and half tuple types (below) can broadcast, on 32-bit or 64-bit elements.
Embedded rounding and {sae}
With EVEX.b = 1 and a register (not memory) last operand, EVEX.L′L gives a rounding mode for this one instruction instead of a length, and the length is 512 bits (or ignored, for a scalar):
| L′L | Written | Rounding |
|---|---|---|
| 00 | {rn-sae} | to nearest, ties to even |
| 01 | {rd-sae} | down, towards −∞ |
| 10 | {ru-sae} | up, towards +∞ |
| 11 | {rz-sae} | towards zero |
Embedded rounding also suppresses all floating-point exceptions (“sae”): no exception
is raised and no MXCSR flag is set. Instructions that do not round (compares, minimum
and maximum, conversions to a wider type) take {sae} alone with the same
EVEX.b bit. Intel marks the forms that allow them with {er} and
{sae}.
disp8×N and the tuple types
With EVEX, an 8-bit displacement is multiplied by N, the size of the memory operand
the instruction touches, so a short displacement reaches 128 elements either side.
For example vaddps zmm0, zmm1, [rax+0x40] is encoded with disp8 = 1. Each
instruction has a tuple type that sets N. A 32-bit displacement is never
scaled.
| Tuple | Short | N, in bytes | Used by |
|---|---|---|---|
| Full | FV | the vector (16, 32 or 64); with broadcast, the element (4 or 8) | most packed instructions |
| Half | HV | half the vector (8, 16 or 32); with broadcast, 4 | conversions from 32-bit elements to 64-bit ones |
| Full Mem | FVM | the vector (16, 32 or 64) | loads and stores, byte and word instructions |
| Tuple1 Scalar | T1S | one element (1, 2, 4 or 8) | scalars, broadcasts of one element, gathers, compress and expand |
| Tuple1 Fixed | T1F | 4 or 8, the size of the source | conversions from a scalar to an integer register |
| Tuple2 | T2 | 8 (two dwords) or 16 (two qwords) | VBROADCASTF32X2, VMOVLPS, VMOVHPS … |
| Tuple4 | T4 | 16 (four dwords) or 32 (four qwords) | VBROADCASTF32X4, VINSERTF64X4 … |
| Tuple8 | T8 | 32 (eight dwords) | VBROADCASTF32X8, VINSERTF32X8 |
| Half Mem | HVM | half the vector (8, 16 or 32) | widening and narrowing moves by a factor of 2 |
| Quarter Mem | QVM | a quarter (4, 8 or 16) | by a factor of 4 |
| Eighth Mem | OVM | an eighth (2, 4 or 8) | by a factor of 8 |
| Mem128 | M128 | 16 | shifts by a count in an xmm register |
| MOVDDUP | DUP | 8, 32 or 64 | VMOVDDUP |
The tables below give each form’s tuple type after its encoding.
Vector lengths and AVX512VL
EVEX.L′L picks the length: 00 for 128 bits (xmm), 01 for 256 (ymm) and 10 for 512
(zmm). 11 is reserved. AVX-512 F by itself has only the 512-bit forms and the scalar
ones. AVX512VL, from Skylake-SP (2017) on, adds the 128-bit and 256-bit
forms of the same instructions (written EVEX.128 and EVEX.256),
which work on xmm and ymm registers, with masks and on all 32 registers.
The tables give the 512-bit form. Unless a row says otherwise, each packed instruction also has its 128-bit and 256-bit forms with AVX512VL: replace zmm with xmm or ymm, m512 with m128 or m256, and EVEX.512 with EVEX.128 or EVEX.256; a half or quarter operand shrinks in step. Xeon Phi processors have no AVX512VL.
Checking for AVX-512
- CPUID leaf 7, sub-leaf 0: EBX bit 16 is AVX-512 F, and bit 31 is AVX512VL. The other sets have bits of their own, given on their pages.
- The operating system must have enabled the state: CPUID leaf 1 ECX bit 27 (OSXSAVE) is set, and XGETBV with ECX = 0 returns XCR0 with bits 1, 2, 5, 6 and 7 set.
Processors
- Intel announced AVX-512 in July 2013. It first shipped in the Xeon Phi x200, Knights Landing, in 2016, with F, CD, ER and PF; then in the Skylake-SP Xeons and Skylake-X Core i9s in 2017, with F, CD, BW, DQ and VL. Later Xeons kept it and added sets.
- Intel’s client processors with AVX-512, besides the Skylake-X Core i9s, were Cannon Lake (2018), Ice Lake (2019), Tiger Lake (2020) and Rocket Lake (2021).
- Alder Lake (late 2021) mixes performance cores, which have the AVX-512 hardware, with efficiency cores, which do not. Intel never supported AVX-512 on it. Early firmware let it run with the efficiency cores turned off; Intel blocked that in firmware and microcode early in 2022 and then began fusing it off in the silicon. Intel’s hybrid client chips since then (Raptor Lake, Meteor Lake, Lunar Lake, Arrow Lake) have no AVX-512.
- AMD added AVX-512 with Zen 4 (2022), and Zen 5 (2024) has it too.
- In July 2023 Intel announced AVX10, which gathers AVX-512 into versions that every core of a processor supports. The first AVX10 specification let a processor stop at 256 bits; the March 2025 revision made 512-bit vectors part of every AVX10 processor again.
Dropping a program on any page of this site opens it in the explorer, which decodes its code, AVX-512 included, and links each instruction to its row here.
The instructions
Every instruction on this page is AVX-512 F, which came with Intel’s Xeon Phi
Knights Landing (2016) and the Skylake-SP Xeons (2017). The 128-bit and 256-bit forms
also need AVX512VL. In the Forms column, {k1}{z} marks a destination that
takes a mask and zeroing, {k1} one that takes a mask only.
Moves
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
vmovaps | zmm1 {k1}{z}, zmm2/m512zmm2/m512 {k1}{z}, zmm1 | EVEX.512.0F.W0 28 /r FVMEVEX.512.0F.W0 29 /r FVM | Moves 16 singles. Memory must be aligned to the vector size (64 bytes for m512), or #GP. | AVX-512 F (Knights Landing, 2016) |
vmovapd | zmm1 {k1}{z}, zmm2/m512zmm2/m512 {k1}{z}, zmm1 | EVEX.512.66.0F.W1 28 /r FVMEVEX.512.66.0F.W1 29 /r FVM | Moves 8 doubles, aligned. | AVX-512 F (Knights Landing, 2016) |
vmovups | zmm1 {k1}{z}, zmm2/m512zmm2/m512 {k1}{z}, zmm1 | EVEX.512.0F.W0 10 /r FVMEVEX.512.0F.W0 11 /r FVM | Moves 16 singles, unaligned. | AVX-512 F (Knights Landing, 2016) |
vmovupd | zmm1 {k1}{z}, zmm2/m512zmm2/m512 {k1}{z}, zmm1 | EVEX.512.66.0F.W1 10 /r FVMEVEX.512.66.0F.W1 11 /r FVM | Moves 8 doubles, unaligned. | AVX-512 F (Knights Landing, 2016) |
vmovdqa32 | zmm1 {k1}{z}, zmm2/m512zmm2/m512 {k1}{z}, zmm1 | EVEX.512.66.0F.W0 6F /r FVMEVEX.512.66.0F.W0 7F /r FVM | Moves 16 dwords, aligned; the mask works per dword. | AVX-512 F (Knights Landing, 2016) |
vmovdqa64 | zmm1 {k1}{z}, zmm2/m512zmm2/m512 {k1}{z}, zmm1 | EVEX.512.66.0F.W1 6F /r FVMEVEX.512.66.0F.W1 7F /r FVM | Moves 8 qwords, aligned. | AVX-512 F (Knights Landing, 2016) |
vmovdqu32 | zmm1 {k1}{z}, zmm2/m512zmm2/m512 {k1}{z}, zmm1 | EVEX.512.F3.0F.W0 6F /r FVMEVEX.512.F3.0F.W0 7F /r FVM | Moves 16 dwords, unaligned. | AVX-512 F (Knights Landing, 2016) |
vmovdqu64 | zmm1 {k1}{z}, zmm2/m512zmm2/m512 {k1}{z}, zmm1 | EVEX.512.F3.0F.W1 6F /r FVMEVEX.512.F3.0F.W1 7F /r FVM | Moves 8 qwords, unaligned. | AVX-512 F (Knights Landing, 2016) |
vmovss | xmm1 {k1}{z}, m32xmm1 {k1}{z}, xmm2, xmm3m32 {k1}, xmm1xmm1 {k1}{z}, xmm2, xmm3 | EVEX.LLIG.F3.0F.W0 10 /r T1SEVEX.LLIG.F3.0F.W0 10 /rEVEX.LLIG.F3.0F.W0 11 /r T1SEVEX.LLIG.F3.0F.W0 11 /r | Moves one single. A load clears bits 127–32; the register form takes the single from xmm3 and bits 127–32 from xmm2 (at 11, ModRM.rm is the destination). | AVX-512 F (Knights Landing, 2016) |
vmovsd | xmm1 {k1}{z}, m64xmm1 {k1}{z}, xmm2, xmm3m64 {k1}, xmm1xmm1 {k1}{z}, xmm2, xmm3 | EVEX.LLIG.F2.0F.W1 10 /r T1SEVEX.LLIG.F2.0F.W1 10 /rEVEX.LLIG.F2.0F.W1 11 /r T1SEVEX.LLIG.F2.0F.W1 11 /r | Moves one double, in the same way. | AVX-512 F (Knights Landing, 2016) |
vmovd | xmm1, r32/m32r32/m32, xmm1 | EVEX.128.66.0F.W0 6E /r T1SEVEX.128.66.0F.W0 7E /r T1S | Moves a dword between an xmm register (bits 31–0, the rest cleared on a load) and a general register or memory. No mask. AVX10.2 adds forms between xmm registers (AVX10). | AVX-512 F (Knights Landing, 2016) |
vmovq | xmm1, r64/m64r64/m64, xmm1xmm1, xmm2/m64xmm1/m64, xmm2 | EVEX.128.66.0F.W1 6E /r T1SEVEX.128.66.0F.W1 7E /r T1SEVEX.128.F3.0F.W1 7E /r T1SEVEX.128.66.0F.W1 D6 /r T1S | Moves a qword, clearing bits 127–64 of a destination register. The general-register forms are for 64-bit mode; elsewhere W is ignored and they are VMOVD. | AVX-512 F (Knights Landing, 2016) |
vmovlps | xmm2, xmm1, m64m64, xmm1 | EVEX.128.0F.W0 12 /r T2EVEX.128.0F.W0 13 /r T2 | Loads two singles into the low half, the high half from xmm1; or stores the low half. No mask. | AVX-512 F (Knights Landing, 2016) |
vmovhlps | xmm1, xmm2, xmm3 | EVEX.128.0F.W0 12 /r (mod = 11) | Low half = the high half of xmm3, high half = the high half of xmm2. | AVX-512 F (Knights Landing, 2016) |
vmovlpd | xmm2, xmm1, m64m64, xmm1 | EVEX.128.66.0F.W1 12 /r T1SEVEX.128.66.0F.W1 13 /r T1S | Loads or stores the low double. | AVX-512 F (Knights Landing, 2016) |
vmovhps | xmm2, xmm1, m64m64, xmm1 | EVEX.128.0F.W0 16 /r T2EVEX.128.0F.W0 17 /r T2 | Loads two singles into the high half, the low half from xmm1; or stores the high half. | AVX-512 F (Knights Landing, 2016) |
vmovlhps | xmm1, xmm2, xmm3 | EVEX.128.0F.W0 16 /r (mod = 11) | Low half = the low half of xmm2, high half = the low half of xmm3. | AVX-512 F (Knights Landing, 2016) |
vmovhpd | xmm2, xmm1, m64m64, xmm1 | EVEX.128.66.0F.W1 16 /r T1SEVEX.128.66.0F.W1 17 /r T1S | Loads or stores the high double. | AVX-512 F (Knights Landing, 2016) |
vmovsldup | zmm1 {k1}{z}, zmm2/m512 | EVEX.512.F3.0F.W0 12 /r FVM | Copies each even single into the odd element above it. | AVX-512 F (Knights Landing, 2016) |
vmovshdup | zmm1 {k1}{z}, zmm2/m512 | EVEX.512.F3.0F.W0 16 /r FVM | Copies each odd single into the even element below it. | AVX-512 F (Knights Landing, 2016) |
vmovddup | zmm1 {k1}{z}, zmm2/m512 | EVEX.512.F2.0F.W1 12 /r DUP | Copies each even double into the odd element above it. The 128-bit form reads only an m64. | AVX-512 F (Knights Landing, 2016) |
vmovntps | m512, zmm1 | EVEX.512.0F.W0 2B /r FVM | Stores 16 singles with a non-temporal hint (past the caches). Aligned; no mask. | AVX-512 F (Knights Landing, 2016) |
vmovntpd | m512, zmm1 | EVEX.512.66.0F.W1 2B /r FVM | Stores 8 doubles, non-temporal. | AVX-512 F (Knights Landing, 2016) |
vmovntdq | m512, zmm1 | EVEX.512.66.0F.W0 E7 /r FVM | Stores 64 bytes of integers, non-temporal. | AVX-512 F (Knights Landing, 2016) |
vmovntdqa | zmm1, m512 | EVEX.512.66.0F38.W0 2A /r FVM | Loads 64 bytes with a non-temporal hint. Aligned; no mask. | AVX-512 F (Knights Landing, 2016) |
Broadcast, insert and extract
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
vbroadcastss | zmm1 {k1}{z}, xmm2/m32 | EVEX.512.66.0F38.W0 18 /r T1S | Copies one single to every element. | AVX-512 F (Knights Landing, 2016) |
vbroadcastsd | zmm1 {k1}{z}, xmm2/m64 | EVEX.512.66.0F38.W1 19 /r T1S | Copies one double to every element. 256 and 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vbroadcastf32x4 | zmm1 {k1}{z}, m128 | EVEX.512.66.0F38.W0 1A /r T4 | Copies four singles to every 128-bit lane; the mask works per single. 256 and 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vbroadcastf64x4 | zmm1 {k1}{z}, m256 | EVEX.512.66.0F38.W1 1B /r T4 | Copies four doubles to both 256-bit halves. 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vbroadcasti32x4 | zmm1 {k1}{z}, m128 | EVEX.512.66.0F38.W0 5A /r T4 | Copies four dwords to every 128-bit lane. 256 and 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vbroadcasti64x4 | zmm1 {k1}{z}, m256 | EVEX.512.66.0F38.W1 5B /r T4 | Copies four qwords to both halves. 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vpbroadcastd | zmm1 {k1}{z}, xmm2/m32zmm1 {k1}{z}, r32 | EVEX.512.66.0F38.W0 58 /r T1SEVEX.512.66.0F38.W0 7C /r | Copies one dword, from a vector, memory or a general register, to every element. | AVX-512 F (Knights Landing, 2016) |
vpbroadcastq | zmm1 {k1}{z}, xmm2/m64zmm1 {k1}{z}, r64 | EVEX.512.66.0F38.W1 59 /r T1SEVEX.512.66.0F38.W1 7C /r | Copies one qword to every element. The r64 form is for 64-bit mode; elsewhere W is ignored there and it is VPBROADCASTD. | AVX-512 F (Knights Landing, 2016) |
vinsertf32x4 | zmm1 {k1}{z}, zmm2, xmm3/m128, imm8 | EVEX.512.66.0F3A.W0 18 /r ib T4 | zmm1 = zmm2 with the 128-bit lane picked by imm8 (bits 1–0) replaced by xmm3. 256 and 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vinsertf64x4 | zmm1 {k1}{z}, zmm2, ymm3/m256, imm8 | EVEX.512.66.0F3A.W1 1A /r ib T4 | zmm1 = zmm2 with the half picked by imm8 bit 0 replaced by ymm3. 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vinserti32x4 | zmm1 {k1}{z}, zmm2, xmm3/m128, imm8 | EVEX.512.66.0F3A.W0 38 /r ib T4 | The same for dwords. 256 and 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vinserti64x4 | zmm1 {k1}{z}, zmm2, ymm3/m256, imm8 | EVEX.512.66.0F3A.W1 3A /r ib T4 | The same for qwords. 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vextractf32x4 | xmm1/m128 {k1}{z}, zmm2, imm8 | EVEX.512.66.0F3A.W0 19 /r ib T4 | Copies the 128-bit lane picked by imm8 out of zmm2. 256 and 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vextractf64x4 | ymm1/m256 {k1}{z}, zmm2, imm8 | EVEX.512.66.0F3A.W1 1B /r ib T4 | Copies the 256-bit half picked by imm8 bit 0. 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vextracti32x4 | xmm1/m128 {k1}{z}, zmm2, imm8 | EVEX.512.66.0F3A.W0 39 /r ib T4 | The same for dwords. | AVX-512 F (Knights Landing, 2016) |
vextracti64x4 | ymm1/m256 {k1}{z}, zmm2, imm8 | EVEX.512.66.0F3A.W1 3B /r ib T4 | The same for qwords. 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vinsertps | xmm1, xmm2, xmm3/m32, imm8 | EVEX.128.66.0F3A.W0 21 /r ib T1S | Inserts one single: imm8 bits 7–6 pick the source element (register form), bits 5–4 the destination, bits 3–0 clear elements. No mask. | AVX-512 F (Knights Landing, 2016) |
vextractps | r/m32, xmm1, imm8 | EVEX.128.66.0F3A.WIG 17 /r ib T1S | Copies the single picked by imm8 bits 1–0 to a general register or memory. | AVX-512 F (Knights Landing, 2016) |
Floating-point arithmetic
ps works on 16 singles, pd on 8 doubles, ss and sd on the lowest element only (the rest of the destination comes from the first source).
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
vaddps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.0F.W0 58 /r FV | zmm1 = zmm2 + zmm3. | AVX-512 F (Knights Landing, 2016) |
vaddpd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F.W1 58 /r FV | zmm1 = zmm2 + zmm3. | AVX-512 F (Knights Landing, 2016) |
vaddss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.F3.0F.W0 58 /r T1S | Adds the low singles. | AVX-512 F (Knights Landing, 2016) |
vaddsd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.F2.0F.W1 58 /r T1S | Adds the low doubles. | AVX-512 F (Knights Landing, 2016) |
vsubps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.0F.W0 5C /r FV | zmm1 = zmm2 − zmm3. | AVX-512 F (Knights Landing, 2016) |
vsubpd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F.W1 5C /r FV | zmm1 = zmm2 − zmm3. | AVX-512 F (Knights Landing, 2016) |
vsubss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.F3.0F.W0 5C /r T1S | Subtracts the low singles. | AVX-512 F (Knights Landing, 2016) |
vsubsd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.F2.0F.W1 5C /r T1S | Subtracts the low doubles. | AVX-512 F (Knights Landing, 2016) |
vmulps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.0F.W0 59 /r FV | zmm1 = zmm2 × zmm3. | AVX-512 F (Knights Landing, 2016) |
vmulpd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F.W1 59 /r FV | zmm1 = zmm2 × zmm3. | AVX-512 F (Knights Landing, 2016) |
vmulss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.F3.0F.W0 59 /r T1S | Multiplies the low singles. | AVX-512 F (Knights Landing, 2016) |
vmulsd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.F2.0F.W1 59 /r T1S | Multiplies the low doubles. | AVX-512 F (Knights Landing, 2016) |
vdivps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.0F.W0 5E /r FV | zmm1 = zmm2 ÷ zmm3. | AVX-512 F (Knights Landing, 2016) |
vdivpd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F.W1 5E /r FV | zmm1 = zmm2 ÷ zmm3. | AVX-512 F (Knights Landing, 2016) |
vdivss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.F3.0F.W0 5E /r T1S | Divides the low singles. | AVX-512 F (Knights Landing, 2016) |
vdivsd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.F2.0F.W1 5E /r T1S | Divides the low doubles. | AVX-512 F (Knights Landing, 2016) |
vsqrtps | zmm1 {k1}{z}, zmm2/m512/m32bcst{er} | EVEX.512.0F.W0 51 /r FV | Square roots of 16 singles. | AVX-512 F (Knights Landing, 2016) |
vsqrtpd | zmm1 {k1}{z}, zmm2/m512/m64bcst{er} | EVEX.512.66.0F.W1 51 /r FV | Square roots of 8 doubles. | AVX-512 F (Knights Landing, 2016) |
vsqrtss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.F3.0F.W0 51 /r T1S | Square root of the low single of xmm3. | AVX-512 F (Knights Landing, 2016) |
vsqrtsd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.F2.0F.W1 51 /r T1S | Square root of the low double of xmm3. | AVX-512 F (Knights Landing, 2016) |
vminps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{sae} | EVEX.512.0F.W0 5D /r FV | The smaller of each pair. If either is a NaN, or both are zero, the result is zmm3’s element. | AVX-512 F (Knights Landing, 2016) |
vminpd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{sae} | EVEX.512.66.0F.W1 5D /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vminss | xmm1 {k1}{z}, xmm2, xmm3/m32{sae} | EVEX.LLIG.F3.0F.W0 5D /r T1S | The smaller of the low singles. | AVX-512 F (Knights Landing, 2016) |
vminsd | xmm1 {k1}{z}, xmm2, xmm3/m64{sae} | EVEX.LLIG.F2.0F.W1 5D /r T1S | The smaller of the low doubles. | AVX-512 F (Knights Landing, 2016) |
vmaxps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{sae} | EVEX.512.0F.W0 5F /r FV | The larger of each pair, with the same NaN and zero rule as VMINPS. | AVX-512 F (Knights Landing, 2016) |
vmaxpd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{sae} | EVEX.512.66.0F.W1 5F /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vmaxss | xmm1 {k1}{z}, xmm2, xmm3/m32{sae} | EVEX.LLIG.F3.0F.W0 5F /r T1S | The larger of the low singles. | AVX-512 F (Knights Landing, 2016) |
vmaxsd | xmm1 {k1}{z}, xmm2, xmm3/m64{sae} | EVEX.LLIG.F2.0F.W1 5F /r T1S | The larger of the low doubles. | AVX-512 F (Knights Landing, 2016) |
vscalefps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 2C /r FV | zmm1 = zmm2 × 2floor(zmm3). | AVX-512 F (Knights Landing, 2016) |
vscalefpd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 2C /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vscalefss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.66.0F38.W0 2D /r T1S | The same for the low single. | AVX-512 F (Knights Landing, 2016) |
vscalefsd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.66.0F38.W1 2D /r T1S | The same for the low double. | AVX-512 F (Knights Landing, 2016) |
vgetexpps | zmm1 {k1}{z}, zmm2/m512/m32bcst{sae} | EVEX.512.66.0F38.W0 42 /r FV | The unbiased exponent of each single, floor(log2|x|), as a single. | AVX-512 F (Knights Landing, 2016) |
vgetexppd | zmm1 {k1}{z}, zmm2/m512/m64bcst{sae} | EVEX.512.66.0F38.W1 42 /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vgetexpss | xmm1 {k1}{z}, xmm2, xmm3/m32{sae} | EVEX.LLIG.66.0F38.W0 43 /r T1S | The exponent of the low single of xmm3. | AVX-512 F (Knights Landing, 2016) |
vgetexpsd | xmm1 {k1}{z}, xmm2, xmm3/m64{sae} | EVEX.LLIG.66.0F38.W1 43 /r T1S | The exponent of the low double of xmm3. | AVX-512 F (Knights Landing, 2016) |
vgetmantps | zmm1 {k1}{z}, zmm2/m512/m32bcst{sae}, imm8 | EVEX.512.66.0F3A.W0 26 /r ib FV | The mantissa of each single, normalised to the interval chosen by imm8 bits 1–0 ([1,2), [½,2), [½,1) or [¾,1½)); bits 3–2 set the sign. | AVX-512 F (Knights Landing, 2016) |
vgetmantpd | zmm1 {k1}{z}, zmm2/m512/m64bcst{sae}, imm8 | EVEX.512.66.0F3A.W1 26 /r ib FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vgetmantss | xmm1 {k1}{z}, xmm2, xmm3/m32{sae}, imm8 | EVEX.LLIG.66.0F3A.W0 27 /r ib T1S | The same for the low single of xmm3. | AVX-512 F (Knights Landing, 2016) |
vgetmantsd | xmm1 {k1}{z}, xmm2, xmm3/m64{sae}, imm8 | EVEX.LLIG.66.0F3A.W1 27 /r ib T1S | The same for the low double of xmm3. | AVX-512 F (Knights Landing, 2016) |
vrcp14ps | zmm1 {k1}{z}, zmm2/m512/m32bcst | EVEX.512.66.0F38.W0 4C /r FV | Approximate reciprocals, with a relative error below 2−14. | AVX-512 F (Knights Landing, 2016) |
vrcp14pd | zmm1 {k1}{z}, zmm2/m512/m64bcst | EVEX.512.66.0F38.W1 4C /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vrcp14ss | xmm1 {k1}{z}, xmm2, xmm3/m32 | EVEX.LLIG.66.0F38.W0 4D /r T1S | The same for the low single of xmm3. | AVX-512 F (Knights Landing, 2016) |
vrcp14sd | xmm1 {k1}{z}, xmm2, xmm3/m64 | EVEX.LLIG.66.0F38.W1 4D /r T1S | The same for the low double of xmm3. | AVX-512 F (Knights Landing, 2016) |
vrsqrt14ps | zmm1 {k1}{z}, zmm2/m512/m32bcst | EVEX.512.66.0F38.W0 4E /r FV | Approximate reciprocal square roots, relative error below 2−14. | AVX-512 F (Knights Landing, 2016) |
vrsqrt14pd | zmm1 {k1}{z}, zmm2/m512/m64bcst | EVEX.512.66.0F38.W1 4E /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vrsqrt14ss | xmm1 {k1}{z}, xmm2, xmm3/m32 | EVEX.LLIG.66.0F38.W0 4F /r T1S | The same for the low single of xmm3. | AVX-512 F (Knights Landing, 2016) |
vrsqrt14sd | xmm1 {k1}{z}, xmm2, xmm3/m64 | EVEX.LLIG.66.0F38.W1 4F /r T1S | The same for the low double of xmm3. | AVX-512 F (Knights Landing, 2016) |
vrndscaleps | zmm1 {k1}{z}, zmm2/m512/m32bcst{sae}, imm8 | EVEX.512.66.0F3A.W0 08 /r ib FV | Rounds each single to imm8 bits 7–4 binary places. Bits 1–0 give the rounding, bit 2 says to use MXCSR’s instead, bit 3 suppresses the precision exception. | AVX-512 F (Knights Landing, 2016) |
vrndscalepd | zmm1 {k1}{z}, zmm2/m512/m64bcst{sae}, imm8 | EVEX.512.66.0F3A.W1 09 /r ib FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vrndscaless | xmm1 {k1}{z}, xmm2, xmm3/m32{sae}, imm8 | EVEX.LLIG.66.0F3A.W0 0A /r ib T1S | The same for the low single of xmm3. | AVX-512 F (Knights Landing, 2016) |
vrndscalesd | xmm1 {k1}{z}, xmm2, xmm3/m64{sae}, imm8 | EVEX.LLIG.66.0F3A.W1 0B /r ib T1S | The same for the low double of xmm3. | AVX-512 F (Knights Landing, 2016) |
vfixupimmps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{sae}, imm8 | EVEX.512.66.0F3A.W0 54 /r ib FV | Fixes up special values. Each element of zmm2 is classed (QNaN, SNaN, zero, one, −∞, +∞, negative, positive); the 4-bit code for that class in the matching dword of zmm3 says what to write: zmm1’s element, zmm2’s, a QNaN, ±0, ±1, ±∞, ½, 90.0, π/2 or the largest number. imm8 says which classes report exceptions. | AVX-512 F (Knights Landing, 2016) |
vfixupimmpd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{sae}, imm8 | EVEX.512.66.0F3A.W1 54 /r ib FV | The same for doubles (the codes in the low dword of each qword). | AVX-512 F (Knights Landing, 2016) |
vfixupimmss | xmm1 {k1}{z}, xmm2, xmm3/m32{sae}, imm8 | EVEX.LLIG.66.0F3A.W0 55 /r ib T1S | The same for the low single. | AVX-512 F (Knights Landing, 2016) |
vfixupimmsd | xmm1 {k1}{z}, xmm2, xmm3/m64{sae}, imm8 | EVEX.LLIG.66.0F3A.W1 55 /r ib T1S | The same for the low double. | AVX-512 F (Knights Landing, 2016) |
Fused multiply-add
The EVEX forms of the FMA3 instructions, with masks, broadcast and embedded rounding. Each rounds once. Calling the operands a, b and c in order, the number names which are multiplied and which is added: 132 is a·c + b, 213 is b·a + c and 231 is b·c + a; the result goes to a. fmsub subtracts instead, fnmadd negates the product, fnmsub does both. fmaddsub subtracts in the even elements and adds in the odd ones, and fmsubadd the other way round.
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
vfmadd132ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 98 /r FV | zmm1 = zmm1 × zmm3 + zmm2. | AVX-512 F (Knights Landing, 2016) |
vfmadd132pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 98 /r FV | zmm1 = zmm1 × zmm3 + zmm2. | AVX-512 F (Knights Landing, 2016) |
vfmadd132ss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.66.0F38.W0 99 /r T1S | The same on the low single. | AVX-512 F (Knights Landing, 2016) |
vfmadd132sd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.66.0F38.W1 99 /r T1S | The same on the low double. | AVX-512 F (Knights Landing, 2016) |
vfmadd213ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 A8 /r FV | zmm1 = zmm2 × zmm1 + zmm3. | AVX-512 F (Knights Landing, 2016) |
vfmadd213pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 A8 /r FV | zmm1 = zmm2 × zmm1 + zmm3. | AVX-512 F (Knights Landing, 2016) |
vfmadd213ss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.66.0F38.W0 A9 /r T1S | The same on the low single. | AVX-512 F (Knights Landing, 2016) |
vfmadd213sd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.66.0F38.W1 A9 /r T1S | The same on the low double. | AVX-512 F (Knights Landing, 2016) |
vfmadd231ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 B8 /r FV | zmm1 = zmm2 × zmm3 + zmm1. | AVX-512 F (Knights Landing, 2016) |
vfmadd231pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 B8 /r FV | zmm1 = zmm2 × zmm3 + zmm1. | AVX-512 F (Knights Landing, 2016) |
vfmadd231ss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.66.0F38.W0 B9 /r T1S | The same on the low single. | AVX-512 F (Knights Landing, 2016) |
vfmadd231sd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.66.0F38.W1 B9 /r T1S | The same on the low double. | AVX-512 F (Knights Landing, 2016) |
vfmsub132ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 9A /r FV | zmm1 = zmm1 × zmm3 − zmm2. | AVX-512 F (Knights Landing, 2016) |
vfmsub132pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 9A /r FV | zmm1 = zmm1 × zmm3 − zmm2. | AVX-512 F (Knights Landing, 2016) |
vfmsub132ss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.66.0F38.W0 9B /r T1S | The same on the low single. | AVX-512 F (Knights Landing, 2016) |
vfmsub132sd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.66.0F38.W1 9B /r T1S | The same on the low double. | AVX-512 F (Knights Landing, 2016) |
vfmsub213ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 AA /r FV | zmm1 = zmm2 × zmm1 − zmm3. | AVX-512 F (Knights Landing, 2016) |
vfmsub213pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 AA /r FV | zmm1 = zmm2 × zmm1 − zmm3. | AVX-512 F (Knights Landing, 2016) |
vfmsub213ss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.66.0F38.W0 AB /r T1S | The same on the low single. | AVX-512 F (Knights Landing, 2016) |
vfmsub213sd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.66.0F38.W1 AB /r T1S | The same on the low double. | AVX-512 F (Knights Landing, 2016) |
vfmsub231ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 BA /r FV | zmm1 = zmm2 × zmm3 − zmm1. | AVX-512 F (Knights Landing, 2016) |
vfmsub231pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 BA /r FV | zmm1 = zmm2 × zmm3 − zmm1. | AVX-512 F (Knights Landing, 2016) |
vfmsub231ss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.66.0F38.W0 BB /r T1S | The same on the low single. | AVX-512 F (Knights Landing, 2016) |
vfmsub231sd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.66.0F38.W1 BB /r T1S | The same on the low double. | AVX-512 F (Knights Landing, 2016) |
vfnmadd132ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 9C /r FV | zmm1 = −(zmm1 × zmm3) + zmm2. | AVX-512 F (Knights Landing, 2016) |
vfnmadd132pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 9C /r FV | zmm1 = −(zmm1 × zmm3) + zmm2. | AVX-512 F (Knights Landing, 2016) |
vfnmadd132ss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.66.0F38.W0 9D /r T1S | The same on the low single. | AVX-512 F (Knights Landing, 2016) |
vfnmadd132sd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.66.0F38.W1 9D /r T1S | The same on the low double. | AVX-512 F (Knights Landing, 2016) |
vfnmadd213ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 AC /r FV | zmm1 = −(zmm2 × zmm1) + zmm3. | AVX-512 F (Knights Landing, 2016) |
vfnmadd213pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 AC /r FV | zmm1 = −(zmm2 × zmm1) + zmm3. | AVX-512 F (Knights Landing, 2016) |
vfnmadd213ss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.66.0F38.W0 AD /r T1S | The same on the low single. | AVX-512 F (Knights Landing, 2016) |
vfnmadd213sd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.66.0F38.W1 AD /r T1S | The same on the low double. | AVX-512 F (Knights Landing, 2016) |
vfnmadd231ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 BC /r FV | zmm1 = −(zmm2 × zmm3) + zmm1. | AVX-512 F (Knights Landing, 2016) |
vfnmadd231pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 BC /r FV | zmm1 = −(zmm2 × zmm3) + zmm1. | AVX-512 F (Knights Landing, 2016) |
vfnmadd231ss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.66.0F38.W0 BD /r T1S | The same on the low single. | AVX-512 F (Knights Landing, 2016) |
vfnmadd231sd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.66.0F38.W1 BD /r T1S | The same on the low double. | AVX-512 F (Knights Landing, 2016) |
vfnmsub132ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 9E /r FV | zmm1 = −(zmm1 × zmm3) − zmm2. | AVX-512 F (Knights Landing, 2016) |
vfnmsub132pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 9E /r FV | zmm1 = −(zmm1 × zmm3) − zmm2. | AVX-512 F (Knights Landing, 2016) |
vfnmsub132ss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.66.0F38.W0 9F /r T1S | The same on the low single. | AVX-512 F (Knights Landing, 2016) |
vfnmsub132sd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.66.0F38.W1 9F /r T1S | The same on the low double. | AVX-512 F (Knights Landing, 2016) |
vfnmsub213ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 AE /r FV | zmm1 = −(zmm2 × zmm1) − zmm3. | AVX-512 F (Knights Landing, 2016) |
vfnmsub213pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 AE /r FV | zmm1 = −(zmm2 × zmm1) − zmm3. | AVX-512 F (Knights Landing, 2016) |
vfnmsub213ss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.66.0F38.W0 AF /r T1S | The same on the low single. | AVX-512 F (Knights Landing, 2016) |
vfnmsub213sd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.66.0F38.W1 AF /r T1S | The same on the low double. | AVX-512 F (Knights Landing, 2016) |
vfnmsub231ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 BE /r FV | zmm1 = −(zmm2 × zmm3) − zmm1. | AVX-512 F (Knights Landing, 2016) |
vfnmsub231pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 BE /r FV | zmm1 = −(zmm2 × zmm3) − zmm1. | AVX-512 F (Knights Landing, 2016) |
vfnmsub231ss | xmm1 {k1}{z}, xmm2, xmm3/m32{er} | EVEX.LLIG.66.0F38.W0 BF /r T1S | The same on the low single. | AVX-512 F (Knights Landing, 2016) |
vfnmsub231sd | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.66.0F38.W1 BF /r T1S | The same on the low double. | AVX-512 F (Knights Landing, 2016) |
vfmaddsub132ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 96 /r FV | zmm1 = zmm1 × zmm3 ∓ zmm2 (− in even elements, + in odd). | AVX-512 F (Knights Landing, 2016) |
vfmaddsub132pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 96 /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vfmaddsub213ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 A6 /r FV | zmm1 = zmm2 × zmm1 ∓ zmm3. | AVX-512 F (Knights Landing, 2016) |
vfmaddsub213pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 A6 /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vfmaddsub231ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 B6 /r FV | zmm1 = zmm2 × zmm3 ∓ zmm1. | AVX-512 F (Knights Landing, 2016) |
vfmaddsub231pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 B6 /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vfmsubadd132ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 97 /r FV | zmm1 = zmm1 × zmm3 ± zmm2 (+ in even elements, − in odd). | AVX-512 F (Knights Landing, 2016) |
vfmsubadd132pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 97 /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vfmsubadd213ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 A7 /r FV | zmm1 = zmm2 × zmm1 ± zmm3. | AVX-512 F (Knights Landing, 2016) |
vfmsubadd213pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 A7 /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vfmsubadd231ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst{er} | EVEX.512.66.0F38.W0 B7 /r FV | zmm1 = zmm2 × zmm3 ± zmm1. | AVX-512 F (Knights Landing, 2016) |
vfmsubadd231pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst{er} | EVEX.512.66.0F38.W1 B7 /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
Floating-point compares
VCMPPS and its kin compare by the predicate in imm8 bits 4–0 and write one mask bit per
element. The disassembler shows an imm8 of 0 to 31 as the predicate’s name, as Intel’s
manual and LLVM do (vcmplt_oqps k1, zmm2, zmm3), and leaves the immediate
out; a larger imm8 is shown as a number. Ordered predicates are false if either value is
a NaN, unordered ones true. Signalling ones raise the invalid exception for a quiet
NaN too; non-signalling ones only for a signalling NaN.
| imm8 | Name | True when | imm8 | Name | True when |
|---|---|---|---|---|---|
| 0 | eq | equal; ordered, quiet | 16 | eq_os | equal; ordered, signalling |
| 1 | lt | less; ordered, signalling | 17 | lt_oq | less; ordered, quiet |
| 2 | le | less or equal; ordered, signalling | 18 | le_oq | less or equal; ordered, quiet |
| 3 | unord | unordered; quiet | 19 | unord_s | unordered; signalling |
| 4 | neq | not equal; unordered, quiet | 20 | neq_us | not equal; unordered, signalling |
| 5 | nlt | not less; unordered, signalling | 21 | nlt_uq | not less; unordered, quiet |
| 6 | nle | not less or equal; unordered, signalling | 22 | nle_uq | not less or equal; unordered, quiet |
| 7 | ord | ordered; quiet | 23 | ord_s | ordered; signalling |
| 8 | eq_uq | equal; unordered, quiet | 24 | eq_us | equal; unordered, signalling |
| 9 | nge | not greater or equal; unordered, signalling | 25 | nge_uq | not greater or equal; unordered, quiet |
| 10 | ngt | not greater; unordered, signalling | 26 | ngt_uq | not greater; unordered, quiet |
| 11 | false | never; ordered, quiet | 27 | false_os | never; ordered, signalling |
| 12 | neq_oq | not equal; ordered, quiet | 28 | neq_os | not equal; ordered, signalling |
| 13 | ge | greater or equal; ordered, signalling | 29 | ge_oq | greater or equal; ordered, quiet |
| 14 | gt | greater; ordered, signalling | 30 | gt_oq | greater; ordered, quiet |
| 15 | true | always; unordered, quiet | 31 | true_us | always; unordered, signalling |
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
vcmpps | k1 {k2}, zmm2, zmm3/m512/m32bcst{sae}, imm8 | EVEX.512.0F.W0 C2 /r ib FV | Compares 16 pairs of singles; bit i of k1 is the result for element i. Predicate names: vcmpeqps vcmpltps vcmpleps vcmpunordps vcmpneqps vcmpnltps vcmpnleps vcmpordps vcmpeq_uqps vcmpngeps vcmpngtps vcmpfalseps vcmpneq_oqps vcmpgeps vcmpgtps vcmptrueps vcmpeq_osps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps | AVX-512 F (Knights Landing, 2016) |
vcmppd | k1 {k2}, zmm2, zmm3/m512/m64bcst{sae}, imm8 | EVEX.512.66.0F.W1 C2 /r ib FV | Compares 8 pairs of doubles into k1. Predicate names: vcmpeqpd vcmpltpd vcmplepd vcmpunordpd vcmpneqpd vcmpnltpd vcmpnlepd vcmpordpd vcmpeq_uqpd vcmpngepd vcmpngtpd vcmpfalsepd vcmpneq_oqpd vcmpgepd vcmpgtpd vcmptruepd vcmpeq_ospd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd | AVX-512 F (Knights Landing, 2016) |
vcmpss | k1 {k2}, xmm2, xmm3/m32{sae}, imm8 | EVEX.LLIG.F3.0F.W0 C2 /r ib T1S | Compares the low singles into bit 0 of k1; the other bits are cleared. Predicate names: vcmpeqss vcmpltss vcmpless vcmpunordss vcmpneqss vcmpnltss vcmpnless vcmpordss vcmpeq_uqss vcmpngess vcmpngtss vcmpfalsess vcmpneq_oqss vcmpgess vcmpgtss vcmptruess vcmpeq_osss vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss | AVX-512 F (Knights Landing, 2016) |
vcmpsd | k1 {k2}, xmm2, xmm3/m64{sae}, imm8 | EVEX.LLIG.F2.0F.W1 C2 /r ib T1S | Compares the low doubles into bit 0 of k1. Predicate names: vcmpeqsd vcmpltsd vcmplesd vcmpunordsd vcmpneqsd vcmpnltsd vcmpnlesd vcmpordsd vcmpeq_uqsd vcmpngesd vcmpngtsd vcmpfalsesd vcmpneq_oqsd vcmpgesd vcmpgtsd vcmptruesd vcmpeq_ossd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd | AVX-512 F (Knights Landing, 2016) |
vcomiss | xmm1, xmm2/m32{sae} | EVEX.LLIG.0F.W0 2F /r T1S | Compares the low singles and sets ZF, PF and CF (unordered: all three); clears OF, SF and AF. Signals invalid for any NaN. | AVX-512 F (Knights Landing, 2016) |
vcomisd | xmm1, xmm2/m64{sae} | EVEX.LLIG.66.0F.W1 2F /r T1S | The same for the low doubles. | AVX-512 F (Knights Landing, 2016) |
vucomiss | xmm1, xmm2/m32{sae} | EVEX.LLIG.0F.W0 2E /r T1S | Like VCOMISS, but signals invalid only for a signalling NaN. | AVX-512 F (Knights Landing, 2016) |
vucomisd | xmm1, xmm2/m64{sae} | EVEX.LLIG.66.0F.W1 2E /r T1S | The same for the low doubles. | AVX-512 F (Knights Landing, 2016) |
Conversions
A conversion to an integer rounds as MXCSR (or {er}) says; the ones with a t, for truncate, round towards zero. A value that does not fit gives the “integer indefinite” value: 80000000h (signed) or FFFFFFFFh (unsigned), and the 64-bit equivalents. The unsigned conversions (udq, usi) are new in AVX-512.
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
vcvtdq2pd | zmm1 {k1}{z}, ymm2/m256/m32bcst | EVEX.512.F3.0F.W0 E6 /r HV | 8 signed dwords to doubles. | AVX-512 F (Knights Landing, 2016) |
vcvtdq2ps | zmm1 {k1}{z}, zmm2/m512/m32bcst{er} | EVEX.512.0F.W0 5B /r FV | 16 signed dwords to singles. | AVX-512 F (Knights Landing, 2016) |
vcvtudq2pd | zmm1 {k1}{z}, ymm2/m256/m32bcst | EVEX.512.F3.0F.W0 7A /r HV | 8 unsigned dwords to doubles. | AVX-512 F (Knights Landing, 2016) |
vcvtudq2ps | zmm1 {k1}{z}, zmm2/m512/m32bcst{er} | EVEX.512.F2.0F.W0 7A /r FV | 16 unsigned dwords to singles. | AVX-512 F (Knights Landing, 2016) |
vcvtps2dq | zmm1 {k1}{z}, zmm2/m512/m32bcst{er} | EVEX.512.66.0F.W0 5B /r FV | 16 singles to signed dwords. | AVX-512 F (Knights Landing, 2016) |
vcvttps2dq | zmm1 {k1}{z}, zmm2/m512/m32bcst{sae} | EVEX.512.F3.0F.W0 5B /r FV | 16 singles to signed dwords, truncating. | AVX-512 F (Knights Landing, 2016) |
vcvtps2udq | zmm1 {k1}{z}, zmm2/m512/m32bcst{er} | EVEX.512.0F.W0 79 /r FV | 16 singles to unsigned dwords. | AVX-512 F (Knights Landing, 2016) |
vcvttps2udq | zmm1 {k1}{z}, zmm2/m512/m32bcst{sae} | EVEX.512.0F.W0 78 /r FV | 16 singles to unsigned dwords, truncating. | AVX-512 F (Knights Landing, 2016) |
vcvtpd2dq | ymm1 {k1}{z}, zmm2/m512/m64bcst{er} | EVEX.512.F2.0F.W1 E6 /r FV | 8 doubles to signed dwords. | AVX-512 F (Knights Landing, 2016) |
vcvttpd2dq | ymm1 {k1}{z}, zmm2/m512/m64bcst{sae} | EVEX.512.66.0F.W1 E6 /r FV | 8 doubles to signed dwords, truncating. | AVX-512 F (Knights Landing, 2016) |
vcvtpd2udq | ymm1 {k1}{z}, zmm2/m512/m64bcst{er} | EVEX.512.0F.W1 79 /r FV | 8 doubles to unsigned dwords. | AVX-512 F (Knights Landing, 2016) |
vcvttpd2udq | ymm1 {k1}{z}, zmm2/m512/m64bcst{sae} | EVEX.512.0F.W1 78 /r FV | 8 doubles to unsigned dwords, truncating. | AVX-512 F (Knights Landing, 2016) |
vcvtps2pd | zmm1 {k1}{z}, ymm2/m256/m32bcst{sae} | EVEX.512.0F.W0 5A /r HV | 8 singles to doubles. | AVX-512 F (Knights Landing, 2016) |
vcvtpd2ps | ymm1 {k1}{z}, zmm2/m512/m64bcst{er} | EVEX.512.66.0F.W1 5A /r FV | 8 doubles to singles. | AVX-512 F (Knights Landing, 2016) |
vcvtph2ps | zmm1 {k1}{z}, ymm2/m256{sae} | EVEX.512.66.0F38.W0 13 /r HVM | 16 half-precision values to singles (the EVEX form of F16C’s VCVTPH2PS). | AVX-512 F (Knights Landing, 2016) |
vcvtps2ph | ymm1/m256 {k1}{z}, zmm2{sae}, imm8 | EVEX.512.66.0F3A.W0 1D /r ib HVM | 16 singles to half precision. imm8 bits 1–0 give the rounding, and bit 2 says to use MXCSR’s instead. A store to memory takes {k1} but not {z}. | AVX-512 F (Knights Landing, 2016) |
vcvtss2sd | xmm1 {k1}{z}, xmm2, xmm3/m32{sae} | EVEX.LLIG.F3.0F.W0 5A /r T1S | The low single to a double. | AVX-512 F (Knights Landing, 2016) |
vcvtsd2ss | xmm1 {k1}{z}, xmm2, xmm3/m64{er} | EVEX.LLIG.F2.0F.W1 5A /r T1S | The low double to a single. | AVX-512 F (Knights Landing, 2016) |
vcvtss2si | r32, xmm1/m32{er}r64, xmm1/m32{er} | EVEX.LLIG.F3.0F.W0 2D /r T1FEVEX.LLIG.F3.0F.W1 2D /r T1F | The low single to a signed integer in a general register. | AVX-512 F (Knights Landing, 2016) |
vcvttss2si | r32, xmm1/m32{sae}r64, xmm1/m32{sae} | EVEX.LLIG.F3.0F.W0 2C /r T1FEVEX.LLIG.F3.0F.W1 2C /r T1F | The same, truncating. | AVX-512 F (Knights Landing, 2016) |
vcvtss2usi | r32, xmm1/m32{er}r64, xmm1/m32{er} | EVEX.LLIG.F3.0F.W0 79 /r T1FEVEX.LLIG.F3.0F.W1 79 /r T1F | The low single to an unsigned integer. | AVX-512 F (Knights Landing, 2016) |
vcvttss2usi | r32, xmm1/m32{sae}r64, xmm1/m32{sae} | EVEX.LLIG.F3.0F.W0 78 /r T1FEVEX.LLIG.F3.0F.W1 78 /r T1F | The same, truncating. | AVX-512 F (Knights Landing, 2016) |
vcvtsd2si | r32, xmm1/m64{er}r64, xmm1/m64{er} | EVEX.LLIG.F2.0F.W0 2D /r T1FEVEX.LLIG.F2.0F.W1 2D /r T1F | The low double to a signed integer. | AVX-512 F (Knights Landing, 2016) |
vcvttsd2si | r32, xmm1/m64{sae}r64, xmm1/m64{sae} | EVEX.LLIG.F2.0F.W0 2C /r T1FEVEX.LLIG.F2.0F.W1 2C /r T1F | The same, truncating. | AVX-512 F (Knights Landing, 2016) |
vcvtsd2usi | r32, xmm1/m64{er}r64, xmm1/m64{er} | EVEX.LLIG.F2.0F.W0 79 /r T1FEVEX.LLIG.F2.0F.W1 79 /r T1F | The low double to an unsigned integer. | AVX-512 F (Knights Landing, 2016) |
vcvttsd2usi | r32, xmm1/m64{sae}r64, xmm1/m64{sae} | EVEX.LLIG.F2.0F.W0 78 /r T1FEVEX.LLIG.F2.0F.W1 78 /r T1F | The same, truncating. | AVX-512 F (Knights Landing, 2016) |
vcvtsi2ss | xmm1, xmm2, r/m32{er}xmm1, xmm2, r/m64{er} | EVEX.LLIG.F3.0F.W0 2A /r T1SEVEX.LLIG.F3.0F.W1 2A /r T1S | A signed integer to the low single; the rest from xmm2. No mask. | AVX-512 F (Knights Landing, 2016) |
vcvtsi2sd | xmm1, xmm2, r/m32xmm1, xmm2, r/m64{er} | EVEX.LLIG.F2.0F.W0 2A /r T1SEVEX.LLIG.F2.0F.W1 2A /r T1S | A signed integer to the low double. A dword always fits exactly, so that form has no rounding. | AVX-512 F (Knights Landing, 2016) |
vcvtusi2ss | xmm1, xmm2, r/m32{er}xmm1, xmm2, r/m64{er} | EVEX.LLIG.F3.0F.W0 7B /r T1SEVEX.LLIG.F3.0F.W1 7B /r T1S | An unsigned integer to the low single. | AVX-512 F (Knights Landing, 2016) |
vcvtusi2sd | xmm1, xmm2, r/m32xmm1, xmm2, r/m64{er} | EVEX.LLIG.F2.0F.W0 7B /r T1SEVEX.LLIG.F2.0F.W1 7B /r T1S | An unsigned integer to the low double. | AVX-512 F (Knights Landing, 2016) |
Integer arithmetic
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
vpaddd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F.W0 FE /r FV | Adds 16 dwords, wrapping. | AVX-512 F (Knights Landing, 2016) |
vpaddq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F.W1 D4 /r FV | Adds 8 qwords. | AVX-512 F (Knights Landing, 2016) |
vpsubd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F.W0 FA /r FV | zmm1 = zmm2 − zmm3, dwords. | AVX-512 F (Knights Landing, 2016) |
vpsubq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F.W1 FB /r FV | zmm1 = zmm2 − zmm3, qwords. | AVX-512 F (Knights Landing, 2016) |
vpmulld | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 40 /r FV | Multiplies dwords, keeping the low 32 bits of each product. | AVX-512 F (Knights Landing, 2016) |
vpmuldq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 28 /r FV | Multiplies the low signed dword of each qword, giving 8 signed 64-bit products. | AVX-512 F (Knights Landing, 2016) |
vpmuludq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F.W1 F4 /r FV | The same, unsigned. | AVX-512 F (Knights Landing, 2016) |
vpabsd | zmm1 {k1}{z}, zmm2/m512/m32bcst | EVEX.512.66.0F38.W0 1E /r FV | Absolute values of 16 signed dwords. | AVX-512 F (Knights Landing, 2016) |
vpabsq | zmm1 {k1}{z}, zmm2/m512/m64bcst | EVEX.512.66.0F38.W1 1F /r FV | Absolute values of 8 signed qwords (new in AVX-512). | AVX-512 F (Knights Landing, 2016) |
vpmaxsd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 3D /r FV | The larger of each pair of signed dwords. | AVX-512 F (Knights Landing, 2016) |
vpmaxsq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 3D /r FV | The larger of each pair of signed qwords. | AVX-512 F (Knights Landing, 2016) |
vpmaxud | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 3F /r FV | The larger of each pair of unsigned dwords. | AVX-512 F (Knights Landing, 2016) |
vpmaxuq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 3F /r FV | The larger of each pair of unsigned qwords. | AVX-512 F (Knights Landing, 2016) |
vpminsd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 39 /r FV | The smaller of each pair of signed dwords. | AVX-512 F (Knights Landing, 2016) |
vpminsq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 39 /r FV | The smaller of each pair of signed qwords. | AVX-512 F (Knights Landing, 2016) |
vpminud | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 3B /r FV | The smaller of each pair of unsigned dwords. | AVX-512 F (Knights Landing, 2016) |
vpminuq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 3B /r FV | The smaller of each pair of unsigned qwords. | AVX-512 F (Knights Landing, 2016) |
Logic
AVX-512 F has the bitwise operations on integers only, by dword or qword (which matters for the mask and for broadcast). The floating-point forms, VANDPS and the rest, came with AVX-512 DQ.
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
vpandd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F.W0 DB /r FV | zmm1 = zmm2 AND zmm3, masked by dword. | AVX-512 F (Knights Landing, 2016) |
vpandq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F.W1 DB /r FV | The same, by qword. | AVX-512 F (Knights Landing, 2016) |
vpandnd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F.W0 DF /r FV | zmm1 = (NOT zmm2) AND zmm3, by dword. | AVX-512 F (Knights Landing, 2016) |
vpandnq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F.W1 DF /r FV | The same, by qword. | AVX-512 F (Knights Landing, 2016) |
vpord | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F.W0 EB /r FV | zmm1 = zmm2 OR zmm3, by dword. | AVX-512 F (Knights Landing, 2016) |
vporq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F.W1 EB /r FV | The same, by qword. | AVX-512 F (Knights Landing, 2016) |
vpxord | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F.W0 EF /r FV | zmm1 = zmm2 XOR zmm3, by dword. | AVX-512 F (Knights Landing, 2016) |
vpxorq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F.W1 EF /r FV | The same, by qword. | AVX-512 F (Knights Landing, 2016) |
vpternlogd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst, imm8 | EVEX.512.66.0F3A.W0 25 /r ib FV | Any function of three inputs, bit by bit: for each bit position the bits of zmm1, zmm2 and zmm3 form a 3-bit index (zmm1 the high bit), and the result is that bit of imm8. 0x96 is a three-way XOR, 0xE8 the majority. | AVX-512 F (Knights Landing, 2016) |
vpternlogq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst, imm8 | EVEX.512.66.0F3A.W1 25 /r ib FV | The same, masked and broadcast by qword. | AVX-512 F (Knights Landing, 2016) |
Shifts and rotates
The immediate shifts and rotates take their destination from EVEX.vvvv and their source from ModRM.rm, which may be memory; ModRM.reg is part of the opcode. A shift count at or above the element size gives 0, or all sign bits for an arithmetic shift.
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
vpslld | zmm1 {k1}{z}, zmm2, xmm3/m128zmm1 {k1}{z}, zmm2/m512/m32bcst, imm8 | EVEX.512.66.0F.W0 F2 /r M128EVEX.512.66.0F.W0 72 /6 ib FV | Shifts dwords left, by the count in the low qword of xmm3 or by imm8. | AVX-512 F (Knights Landing, 2016) |
vpsllq | zmm1 {k1}{z}, zmm2, xmm3/m128zmm1 {k1}{z}, zmm2/m512/m64bcst, imm8 | EVEX.512.66.0F.W1 F3 /r M128EVEX.512.66.0F.W1 73 /6 ib FV | Shifts qwords left. | AVX-512 F (Knights Landing, 2016) |
vpsrld | zmm1 {k1}{z}, zmm2, xmm3/m128zmm1 {k1}{z}, zmm2/m512/m32bcst, imm8 | EVEX.512.66.0F.W0 D2 /r M128EVEX.512.66.0F.W0 72 /2 ib FV | Shifts dwords right, filling with zeros. | AVX-512 F (Knights Landing, 2016) |
vpsrlq | zmm1 {k1}{z}, zmm2, xmm3/m128zmm1 {k1}{z}, zmm2/m512/m64bcst, imm8 | EVEX.512.66.0F.W1 D3 /r M128EVEX.512.66.0F.W1 73 /2 ib FV | Shifts qwords right, filling with zeros. | AVX-512 F (Knights Landing, 2016) |
vpsrad | zmm1 {k1}{z}, zmm2, xmm3/m128zmm1 {k1}{z}, zmm2/m512/m32bcst, imm8 | EVEX.512.66.0F.W0 E2 /r M128EVEX.512.66.0F.W0 72 /4 ib FV | Shifts dwords right, filling with the sign bit. | AVX-512 F (Knights Landing, 2016) |
vpsraq | zmm1 {k1}{z}, zmm2, xmm3/m128zmm1 {k1}{z}, zmm2/m512/m64bcst, imm8 | EVEX.512.66.0F.W1 E2 /r M128EVEX.512.66.0F.W1 72 /4 ib FV | Shifts qwords right, filling with the sign bit (new in AVX-512). | AVX-512 F (Knights Landing, 2016) |
vpsllvd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 47 /r FV | Shifts each dword of zmm2 left by the matching dword of zmm3. | AVX-512 F (Knights Landing, 2016) |
vpsllvq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 47 /r FV | The same for qwords. | AVX-512 F (Knights Landing, 2016) |
vpsrlvd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 45 /r FV | Shifts each dword right by its own count, filling with zeros. | AVX-512 F (Knights Landing, 2016) |
vpsrlvq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 45 /r FV | The same for qwords. | AVX-512 F (Knights Landing, 2016) |
vpsravd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 46 /r FV | Shifts each dword right by its own count, filling with the sign bit. | AVX-512 F (Knights Landing, 2016) |
vpsravq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 46 /r FV | The same for qwords (new in AVX-512). | AVX-512 F (Knights Landing, 2016) |
vprold | zmm1 {k1}{z}, zmm2/m512/m32bcst, imm8 | EVEX.512.66.0F.W0 72 /1 ib FV | Rotates each dword left by imm8 (modulo 32). | AVX-512 F (Knights Landing, 2016) |
vprolq | zmm1 {k1}{z}, zmm2/m512/m64bcst, imm8 | EVEX.512.66.0F.W1 72 /1 ib FV | Rotates each qword left by imm8 (modulo 64). | AVX-512 F (Knights Landing, 2016) |
vprord | zmm1 {k1}{z}, zmm2/m512/m32bcst, imm8 | EVEX.512.66.0F.W0 72 /0 ib FV | Rotates each dword right by imm8. | AVX-512 F (Knights Landing, 2016) |
vprorq | zmm1 {k1}{z}, zmm2/m512/m64bcst, imm8 | EVEX.512.66.0F.W1 72 /0 ib FV | Rotates each qword right by imm8. | AVX-512 F (Knights Landing, 2016) |
vprolvd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 15 /r FV | Rotates each dword of zmm2 left by the matching dword of zmm3. | AVX-512 F (Knights Landing, 2016) |
vprolvq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 15 /r FV | The same for qwords. | AVX-512 F (Knights Landing, 2016) |
vprorvd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 14 /r FV | Rotates each dword right by its own count. | AVX-512 F (Knights Landing, 2016) |
vprorvq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 14 /r FV | The same for qwords. | AVX-512 F (Knights Landing, 2016) |
Integer compares and tests
These write a mask, one bit per element. VPCMPD and its kin take the predicate in imm8 bits 2–0: 0 eq, 1 lt, 2 le, 3 false, 4 neq, 5 nlt (not less: greater or equal), 6 nle (greater), 7 true. The disassembler shows predicates 0, 1, 2, 4, 5 and 6 by name, as Intel’s manual and LLVM do, and keeps the immediate for the others.
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
vpcmpd | k1 {k2}, zmm2, zmm3/m512/m32bcst, imm8 | EVEX.512.66.0F3A.W0 1F /r ib FV | Compares signed dwords by the predicate. Predicate names: vpcmpeqd (shared with the instruction below) vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled | AVX-512 F (Knights Landing, 2016) |
vpcmpq | k1 {k2}, zmm2, zmm3/m512/m64bcst, imm8 | EVEX.512.66.0F3A.W1 1F /r ib FV | Compares signed qwords. Predicate names: vpcmpeqq vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq | AVX-512 F (Knights Landing, 2016) |
vpcmpud | k1 {k2}, zmm2, zmm3/m512/m32bcst, imm8 | EVEX.512.66.0F3A.W0 1E /r ib FV | Compares unsigned dwords. Predicate names: vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud | AVX-512 F (Knights Landing, 2016) |
vpcmpuq | k1 {k2}, zmm2, zmm3/m512/m64bcst, imm8 | EVEX.512.66.0F3A.W1 1E /r ib FV | Compares unsigned qwords. Predicate names: vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq | AVX-512 F (Knights Landing, 2016) |
vpcmpeqd | k1 {k2}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F.W0 76 /r FV | Sets a mask bit where dwords are equal. Also the name of VPCMPD with predicate 0. | AVX-512 F (Knights Landing, 2016) |
vpcmpeqq | k1 {k2}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 29 /r FV | Sets a mask bit where qwords are equal. Also the name of VPCMPQ with predicate 0. | AVX-512 F (Knights Landing, 2016) |
vpcmpgtd | k1 {k2}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F.W0 66 /r FV | Sets a mask bit where the signed dword of zmm2 is greater. | AVX-512 F (Knights Landing, 2016) |
vpcmpgtq | k1 {k2}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 37 /r FV | The same for signed qwords. | AVX-512 F (Knights Landing, 2016) |
vptestmd | k1 {k2}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 27 /r FV | Sets a mask bit where zmm2 AND zmm3 is not zero, by dword. | AVX-512 F (Knights Landing, 2016) |
vptestmq | k1 {k2}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 27 /r FV | The same by qword. | AVX-512 F (Knights Landing, 2016) |
vptestnmd | k1 {k2}, zmm2, zmm3/m512/m32bcst | EVEX.512.F3.0F38.W0 27 /r FV | Sets a mask bit where zmm2 AND zmm3 is zero, by dword. | AVX-512 F (Knights Landing, 2016) |
vptestnmq | k1 {k2}, zmm2, zmm3/m512/m64bcst | EVEX.512.F3.0F38.W1 27 /r FV | The same by qword. | AVX-512 F (Knights Landing, 2016) |
Shuffles, permutes and unpacks
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
vpshufd | zmm1 {k1}{z}, zmm2/m512/m32bcst, imm8 | EVEX.512.66.0F.W0 70 /r ib FV | Within each 128-bit lane, picks each dword from the lane’s four by a 2-bit field of imm8. | AVX-512 F (Knights Landing, 2016) |
vshufps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst, imm8 | EVEX.512.0F.W0 C6 /r ib FV | Within each lane, the low two singles are picked from zmm2 and the high two from zmm3, by imm8. | AVX-512 F (Knights Landing, 2016) |
vshufpd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst, imm8 | EVEX.512.66.0F.W1 C6 /r ib FV | Within each lane, the low double from zmm2 and the high one from zmm3, each picked by one bit of imm8. | AVX-512 F (Knights Landing, 2016) |
vshuff32x4 | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst, imm8 | EVEX.512.66.0F3A.W0 23 /r ib FV | Picks whole 128-bit lanes: the low half of the result from zmm2’s lanes and the high half from zmm3’s, by 2-bit fields of imm8 (1-bit at 256 bits). 256 and 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vshuff64x2 | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst, imm8 | EVEX.512.66.0F3A.W1 23 /r ib FV | The same, masked by double. | AVX-512 F (Knights Landing, 2016) |
vshufi32x4 | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst, imm8 | EVEX.512.66.0F3A.W0 43 /r ib FV | The same, masked by dword. | AVX-512 F (Knights Landing, 2016) |
vshufi64x2 | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst, imm8 | EVEX.512.66.0F3A.W1 43 /r ib FV | The same, masked by qword. | AVX-512 F (Knights Landing, 2016) |
valignd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst, imm8 | EVEX.512.66.0F3A.W0 03 /r ib FV | Joins zmm2 (high) and zmm3 (low), shifts the pair right by imm8 dwords and keeps the low vector. | AVX-512 F (Knights Landing, 2016) |
valignq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst, imm8 | EVEX.512.66.0F3A.W1 03 /r ib FV | The same by qwords. | AVX-512 F (Knights Landing, 2016) |
vpermd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 36 /r FV | Each dword of the result is the dword of zmm3 picked by the matching index in zmm2. 256 and 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vpermq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcstzmm1 {k1}{z}, zmm2/m512/m64bcst, imm8 | EVEX.512.66.0F38.W1 36 /r FVEVEX.512.66.0F3A.W1 00 /r ib FV | The same for qwords, with indices in zmm2; or, by imm8, the same pick within each 256-bit half. 256 and 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vpermps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 16 /r FV | VPERMD for singles. 256 and 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vpermpd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcstzmm1 {k1}{z}, zmm2/m512/m64bcst, imm8 | EVEX.512.66.0F38.W1 16 /r FVEVEX.512.66.0F3A.W1 01 /r ib FV | VPERMQ for doubles. 256 and 512 bits only. | AVX-512 F (Knights Landing, 2016) |
vpermilps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcstzmm1 {k1}{z}, zmm2/m512/m32bcst, imm8 | EVEX.512.66.0F38.W0 0C /r FVEVEX.512.66.0F3A.W0 04 /r ib FV | Within each 128-bit lane, picks singles by the low two bits of each dword of zmm3, or by imm8. | AVX-512 F (Knights Landing, 2016) |
vpermilpd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcstzmm1 {k1}{z}, zmm2/m512/m64bcst, imm8 | EVEX.512.66.0F38.W1 0D /r FVEVEX.512.66.0F3A.W1 05 /r ib FV | Within each lane, picks doubles by bit 1 of each qword of zmm3, or by imm8. | AVX-512 F (Knights Landing, 2016) |
vpermi2d | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 76 /r FV | A lookup in two tables, zmm2 and zmm3: each index in zmm1 picks a dword from the pair, and the result overwrites the indices. | AVX-512 F (Knights Landing, 2016) |
vpermi2q | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 76 /r FV | The same for qwords. | AVX-512 F (Knights Landing, 2016) |
vpermi2ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 77 /r FV | The same for singles. | AVX-512 F (Knights Landing, 2016) |
vpermi2pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 77 /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vpermt2d | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 7E /r FV | A lookup in two tables, zmm1 and zmm3, by the indices in zmm2; the result overwrites the first table. | AVX-512 F (Knights Landing, 2016) |
vpermt2q | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 7E /r FV | The same for qwords. | AVX-512 F (Knights Landing, 2016) |
vpermt2ps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 7F /r FV | The same for singles. | AVX-512 F (Knights Landing, 2016) |
vpermt2pd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 7F /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vunpcklps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.0F.W0 14 /r FV | Interleaves the low two singles of each lane of zmm2 and zmm3. | AVX-512 F (Knights Landing, 2016) |
vunpcklpd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F.W1 14 /r FV | Interleaves the low doubles of each lane. | AVX-512 F (Knights Landing, 2016) |
vunpckhps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.0F.W0 15 /r FV | Interleaves the high two singles of each lane. | AVX-512 F (Knights Landing, 2016) |
vunpckhpd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F.W1 15 /r FV | Interleaves the high doubles of each lane. | AVX-512 F (Knights Landing, 2016) |
vpunpckldq | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F.W0 62 /r FV | Interleaves the low two dwords of each lane. | AVX-512 F (Knights Landing, 2016) |
vpunpckhdq | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F.W0 6A /r FV | Interleaves the high two dwords of each lane. | AVX-512 F (Knights Landing, 2016) |
vpunpcklqdq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F.W1 6C /r FV | Interleaves the low qwords of each lane. | AVX-512 F (Knights Landing, 2016) |
vpunpckhqdq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F.W1 6D /r FV | Interleaves the high qwords of each lane. | AVX-512 F (Knights Landing, 2016) |
Blend, compress and expand
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
vblendmps | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 65 /r FV | Takes each single from zmm3 where the mask bit is set and from zmm2 where it is clear (or 0, with {z}). | AVX-512 F (Knights Landing, 2016) |
vblendmpd | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 65 /r FV | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vpblendmd | zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst | EVEX.512.66.0F38.W0 64 /r FV | The same for dwords. | AVX-512 F (Knights Landing, 2016) |
vpblendmq | zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst | EVEX.512.66.0F38.W1 64 /r FV | The same for qwords. | AVX-512 F (Knights Landing, 2016) |
vcompressps | zmm1/m512 {k1}{z}, zmm2 | EVEX.512.66.0F38.W0 8A /r T1S | Packs the singles of zmm2 whose mask bits are set into the low elements of the destination, in order. To memory it writes only those elements, one after another. | AVX-512 F (Knights Landing, 2016) |
vcompresspd | zmm1/m512 {k1}{z}, zmm2 | EVEX.512.66.0F38.W1 8A /r T1S | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vpcompressd | zmm1/m512 {k1}{z}, zmm2 | EVEX.512.66.0F38.W0 8B /r T1S | The same for dwords. | AVX-512 F (Knights Landing, 2016) |
vpcompressq | zmm1/m512 {k1}{z}, zmm2 | EVEX.512.66.0F38.W1 8B /r T1S | The same for qwords. | AVX-512 F (Knights Landing, 2016) |
vexpandps | zmm1 {k1}{z}, zmm2/m512 | EVEX.512.66.0F38.W0 88 /r T1S | The reverse: the low singles of the source, in order, go to the elements whose mask bits are set. From memory it reads only as many elements as are needed. | AVX-512 F (Knights Landing, 2016) |
vexpandpd | zmm1 {k1}{z}, zmm2/m512 | EVEX.512.66.0F38.W1 88 /r T1S | The same for doubles. | AVX-512 F (Knights Landing, 2016) |
vpexpandd | zmm1 {k1}{z}, zmm2/m512 | EVEX.512.66.0F38.W0 89 /r T1S | The same for dwords. | AVX-512 F (Knights Landing, 2016) |
vpexpandq | zmm1 {k1}{z}, zmm2/m512 | EVEX.512.66.0F38.W1 89 /r T1S | The same for qwords. | AVX-512 F (Knights Landing, 2016) |
Narrowing and widening moves
The narrowing moves (VPMOVDB and the rest) store to their ModRM.rm operand, register or memory; a store to memory takes {k1} but not {z}. Plain ones truncate, s ones saturate as signed, us ones as unsigned.
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
vpmovdb | xmm1/m128 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 31 /r QVM | 16 dwords to bytes, truncating. | AVX-512 F (Knights Landing, 2016) |
vpmovsdb | xmm1/m128 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 21 /r QVM | 16 signed dwords to bytes, saturating. | AVX-512 F (Knights Landing, 2016) |
vpmovusdb | xmm1/m128 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 11 /r QVM | 16 unsigned dwords to bytes, saturating. | AVX-512 F (Knights Landing, 2016) |
vpmovdw | ymm1/m256 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 33 /r HVM | 16 dwords to words, truncating. | AVX-512 F (Knights Landing, 2016) |
vpmovsdw | ymm1/m256 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 23 /r HVM | Signed dwords to words, saturating. | AVX-512 F (Knights Landing, 2016) |
vpmovusdw | ymm1/m256 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 13 /r HVM | Unsigned dwords to words, saturating. | AVX-512 F (Knights Landing, 2016) |
vpmovqb | xmm1/m64 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 32 /r OVM | 8 qwords to bytes, truncating. | AVX-512 F (Knights Landing, 2016) |
vpmovsqb | xmm1/m64 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 22 /r OVM | Signed qwords to bytes, saturating. | AVX-512 F (Knights Landing, 2016) |
vpmovusqb | xmm1/m64 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 12 /r OVM | Unsigned qwords to bytes, saturating. | AVX-512 F (Knights Landing, 2016) |
vpmovqw | xmm1/m128 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 34 /r QVM | 8 qwords to words, truncating. | AVX-512 F (Knights Landing, 2016) |
vpmovsqw | xmm1/m128 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 24 /r QVM | Signed qwords to words, saturating. | AVX-512 F (Knights Landing, 2016) |
vpmovusqw | xmm1/m128 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 14 /r QVM | Unsigned qwords to words, saturating. | AVX-512 F (Knights Landing, 2016) |
vpmovqd | ymm1/m256 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 35 /r HVM | 8 qwords to dwords, truncating. | AVX-512 F (Knights Landing, 2016) |
vpmovsqd | ymm1/m256 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 25 /r HVM | Signed qwords to dwords, saturating. | AVX-512 F (Knights Landing, 2016) |
vpmovusqd | ymm1/m256 {k1}{z}, zmm2 | EVEX.512.F3.0F38.W0 15 /r HVM | Unsigned qwords to dwords, saturating. | AVX-512 F (Knights Landing, 2016) |
vpmovsxbd | zmm1 {k1}{z}, xmm2/m128 | EVEX.512.66.0F38.WIG 21 /r QVM | 16 bytes to dwords, sign-extending. | AVX-512 F (Knights Landing, 2016) |
vpmovsxbq | zmm1 {k1}{z}, xmm2/m64 | EVEX.512.66.0F38.WIG 22 /r OVM | 8 bytes to qwords, sign-extending. | AVX-512 F (Knights Landing, 2016) |
vpmovsxwd | zmm1 {k1}{z}, ymm2/m256 | EVEX.512.66.0F38.WIG 23 /r HVM | 16 words to dwords, sign-extending. | AVX-512 F (Knights Landing, 2016) |
vpmovsxwq | zmm1 {k1}{z}, xmm2/m128 | EVEX.512.66.0F38.WIG 24 /r QVM | 8 words to qwords, sign-extending. | AVX-512 F (Knights Landing, 2016) |
vpmovsxdq | zmm1 {k1}{z}, ymm2/m256 | EVEX.512.66.0F38.W0 25 /r HVM | 8 dwords to qwords, sign-extending. | AVX-512 F (Knights Landing, 2016) |
vpmovzxbd | zmm1 {k1}{z}, xmm2/m128 | EVEX.512.66.0F38.WIG 31 /r QVM | 16 bytes to dwords, zero-extending. | AVX-512 F (Knights Landing, 2016) |
vpmovzxbq | zmm1 {k1}{z}, xmm2/m64 | EVEX.512.66.0F38.WIG 32 /r OVM | 8 bytes to qwords, zero-extending. | AVX-512 F (Knights Landing, 2016) |
vpmovzxwd | zmm1 {k1}{z}, ymm2/m256 | EVEX.512.66.0F38.WIG 33 /r HVM | 16 words to dwords, zero-extending. | AVX-512 F (Knights Landing, 2016) |
vpmovzxwq | zmm1 {k1}{z}, xmm2/m128 | EVEX.512.66.0F38.WIG 34 /r QVM | 8 words to qwords, zero-extending. | AVX-512 F (Knights Landing, 2016) |
vpmovzxdq | zmm1 {k1}{z}, ymm2/m256 | EVEX.512.66.0F38.W0 35 /r HVM | 8 dwords to qwords, zero-extending. | AVX-512 F (Knights Landing, 2016) |
Gathers and scatters
These address memory with a vector of indices, VSIB: the SIB byte’s index field names a vector register, and each element’s address is base + index × scale + displacement. vm32z is a zmm of dword indices, vm32y a ymm of them, vm64z a zmm of qword indices. The mask, which must not be k0, says which elements to move; each bit is cleared as its element is done, so a gather or scatter interrupted by a fault can be restarted. The gathers take no {z}. Using the same register as destination and index is #UD. The memory operand counts as one element for disp8×N (T1S).
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
vgatherdps | zmm1 {k1}, vm32z | EVEX.512.66.0F38.W0 92 /vsib T1S | Loads 16 singles by dword indices. | AVX-512 F (Knights Landing, 2016) |
vgatherdpd | zmm1 {k1}, vm32y | EVEX.512.66.0F38.W1 92 /vsib T1S | Loads 8 doubles by dword indices. | AVX-512 F (Knights Landing, 2016) |
vgatherqps | ymm1 {k1}, vm64z | EVEX.512.66.0F38.W0 93 /vsib T1S | Loads 8 singles by qword indices. | AVX-512 F (Knights Landing, 2016) |
vgatherqpd | zmm1 {k1}, vm64z | EVEX.512.66.0F38.W1 93 /vsib T1S | Loads 8 doubles by qword indices. | AVX-512 F (Knights Landing, 2016) |
vpgatherdd | zmm1 {k1}, vm32z | EVEX.512.66.0F38.W0 90 /vsib T1S | Loads 16 dwords by dword indices. | AVX-512 F (Knights Landing, 2016) |
vpgatherdq | zmm1 {k1}, vm32y | EVEX.512.66.0F38.W1 90 /vsib T1S | Loads 8 qwords by dword indices. | AVX-512 F (Knights Landing, 2016) |
vpgatherqd | ymm1 {k1}, vm64z | EVEX.512.66.0F38.W0 91 /vsib T1S | Loads 8 dwords by qword indices. | AVX-512 F (Knights Landing, 2016) |
vpgatherqq | zmm1 {k1}, vm64z | EVEX.512.66.0F38.W1 91 /vsib T1S | Loads 8 qwords by qword indices. | AVX-512 F (Knights Landing, 2016) |
vscatterdps | vm32z {k1}, zmm1 | EVEX.512.66.0F38.W0 A2 /vsib T1S | Stores 16 singles by dword indices. Where two elements go to the same address, the later one is written last. | AVX-512 F (Knights Landing, 2016) |
vscatterdpd | vm32y {k1}, zmm1 | EVEX.512.66.0F38.W1 A2 /vsib T1S | Stores 8 doubles by dword indices. | AVX-512 F (Knights Landing, 2016) |
vscatterqps | vm64z {k1}, ymm1 | EVEX.512.66.0F38.W0 A3 /vsib T1S | Stores 8 singles by qword indices. | AVX-512 F (Knights Landing, 2016) |
vscatterqpd | vm64z {k1}, zmm1 | EVEX.512.66.0F38.W1 A3 /vsib T1S | Stores 8 doubles by qword indices. | AVX-512 F (Knights Landing, 2016) |
vpscatterdd | vm32z {k1}, zmm1 | EVEX.512.66.0F38.W0 A0 /vsib T1S | Stores 16 dwords by dword indices. | AVX-512 F (Knights Landing, 2016) |
vpscatterdq | vm32y {k1}, zmm1 | EVEX.512.66.0F38.W1 A0 /vsib T1S | Stores 8 qwords by dword indices. | AVX-512 F (Knights Landing, 2016) |
vpscatterqd | vm64z {k1}, ymm1 | EVEX.512.66.0F38.W0 A1 /vsib T1S | Stores 8 dwords by qword indices. | AVX-512 F (Knights Landing, 2016) |
vpscatterqq | vm64z {k1}, zmm1 | EVEX.512.66.0F38.W1 A1 /vsib T1S | Stores 8 qwords by qword indices. | AVX-512 F (Knights Landing, 2016) |
Notes
- Alignment. Only VMOVAPS, VMOVAPD, VMOVDQA32, VMOVDQA64 and the non-temporal moves need aligned memory, to the size of the operand. Every other instruction accepts any address.
- Flags. Only VCOMISS, VCOMISD, VUCOMISS and VUCOMISD change RFLAGS.
- Reserved length. EVEX.L′L = 11 is reserved, except where it holds a rounding mode or the instruction ignores the length. LLVM decodes it as 512 bits; our decoder shows it as an invalid instruction.
- W1 outside 64-bit mode. Intel’s manual gives the W1 forms VMOVDQA64, VMOVDQU64, VINSERTF64X4, VEXTRACTF64X4, VBROADCASTF64X4, VSHUFF64X2 and their integer partners as valid in every mode. LLVM 21 shows them outside 64-bit mode as the W0 instructions (VMOVDQA32 …); our decoder follows Intel.
- General registers outside 64-bit mode. Where W picks a 64-bit general register (VMOVQ at 6E and 7E, VPBROADCASTQ at 7C, VCVTSI2SD and the like), W is ignored outside 64-bit mode and the instruction acts as its 32-bit form, as Intel’s manual says. Our decoder shows that form; for VPBROADCASTQ, LLVM 21 shows a 64-bit register that does not exist there.
- 66 0F 5B with W1 is not an instruction (VCVTPS2DQ is W0, and VCVTQQ2PS is the no-prefix form). LLVM 21 shows it as VCVTQQ2PS; we show it as invalid.
- Each of these differences is a known rule of our tests, which otherwise match LLVM’s output for every instruction on this page in every mode.
Links
Reference
- Intel 64 and IA-32 Architectures Software Developer’s Manuals – Intel’s manual; volume 1 explains AVX-512 and volume 2 the EVEX encoding and every instruction
- AMD64 Architecture Programmer’s Manual, Volume 4 – AMD’s reference to the 128-bit, 256-bit and 512-bit media instructions
- Intel Architecture Instruction Set Extensions Programming Reference – Intel’s specification of extensions before they reach the main manual
- x86 and amd64 instruction reference – Félix Cloutier’s copy of the instruction pages of Intel’s manual