Extensions
Forms
2 (2 VEX)
Data
Intel XED v2026.08.23

VAESKEYGENASSIST is the VEX form of AESKEYGENASSIST, whose page covers SubWord, RotWord, the round constant and the shuffles and XORs that finish a step of the key expansion. It needs AES and AVX, reads one 128-bit source, register or memory at any alignment, clears the destination above bit 127 and raises #UD unless VEX.vvvv is 1111b. Like VAESIMC it has no 256-bit and no EVEX form: VAES widened only the rounds, and a key schedule is computed once, one key at a time.

Recorded on Zen 5

  • From the cipher key of FIPS-197’s AES-128 example, 000102030405060708090A0B0C0D0E0F, with the round constant 01h, dword 3 of the result held the bytes D6 AB 76 FE; XORed with the key’s first word, 00 01 02 03, they give D6 AA 74 FD, the first word of round key 1 in the standard.
  • From a zero source, the immediate 80h gave the bytes E3 63 63 63 in dwords 1 and 3 and 63 in every other byte: the constant changes only the lowest byte of each rotated word.
  • All four recorded cases cleared bits 511:128.

In compiled code

The three-operand forms around it remove the register copies of the legacy sequence. In our builds at -O2, three steps of an AES-128 key expansion written with _mm_aeskeygenassist_si128, _mm_shuffle_epi32 and three _mm_slli_si128 and XOR pairs take GCC 14 thirteen instructions per step with -maes alone, three of them MOVDQA, and ten with -march=x86-64-v3 -maes, where VPSLLDQ writes a new register and nothing is copied. Clang 23 drops its copies the same way.

AMD’s latency spreadsheet for Zen 5 gives VAESKEYGENASSIST one row, the VEX one: a latency of 4 cycles, two per cycle on pipes FP0 and FP1, as for AESKEYGENASSIST.

Forms

Every encoding of VAESKEYGENASSIST that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
VAESKEYGENASSIST xmm, xmm, imm8 VAESKEYGENASSIST_XMMdq_XMMdq_IMMbVEX.128.66.0F3A.WIG DF /r ibAES + AVX
VAESKEYGENASSIST xmm, m128, imm8 VAESKEYGENASSIST_XMMdq_MEMdq_IMMbVEX.128.66.0F3A.WIG DF /r ibAES + AVX

Latency and throughput

What the scheduling models of LLVM 23.1.2 give for each form, not measurements: latency / reciprocal throughput in cycles, the ports under them. A row is a model, or models that agree; a dash, a form that its processors lack. Memory forms: latency from the address, ports without the load and store units. Which processors each model covers.
Modelxmm, xmm, imm8xmm, m128, imm8
Sandy Bridge8 / 3.67p01514 / 3.33p015
Haswell29 / 7p01534 / 7p015
Broadwell29 / 7p01533 / 7p015
Skylake, Skylake-SP, Ice Lake20 / 6p01525 / 6p015
Alder Lake, Sapphire Rapids7 / 4p015612 / 4p0156
Piledriver5 / 1FPMMA FPU010 / 1.5FPMMA FPU0
Zen, Zen 24 / 0.5FPU0 FPU111 / 0.5FPU0 FPU1
Zen 3, Zen 44 / 0.5FP0 FP111 / 0.5FP0 FP1
Jaguar2 / 1FPU0 VIMUL7 / 1FPU0 VIMUL

Operation

What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.

x1 = sub_word(src2.d[1])           # SubWord: each byte
x3 = sub_word(src2.d[3])           # through the S-box
xmm1.d[0] = x1
xmm1.d[1] = ror(x1, 8, 32) ^ imm8  # RotWord turns byte 1
xmm1.d[2] = x3                     # into byte 0; imm8 is
xmm1.d[3] = ror(x3, 8, 32) ^ imm8  # zero-extended
# xmm1 is zeroed from bit 128 up

Run on AMD Zen 5 (EPYC 9645): 4 cases.

Operands

What each form reads and writes, as Intel XED records it: the operands of its syntax, in order, and the implicit ones that the syntax does not name. How to read.
OperandKindAction
VAESKEYGENASSIST xmm, xmm/m128, imm8
xmmexplicitwrite
xmm/m128explicitread
imm8explicitread

Flags

None: XED records no flag that the forms test or change.

Exceptions

The exception class is XED's name for the set of exception conditions that a form follows. How to read.

All forms
avx-type-4

CPUID and processors

Each form belongs to an XED ISA set. A form can be used when the processor reports every CPUID bit of one of its ISA set's alternatives.

CPUID requirements and processors of the XED ISA sets above. Alternatives are separated by “or”; processors follow XED’s chip model, whose AMD processors end with Zen 2, and the CPU data of this site for Zen 3 to Zen 6.

More AES-NI instructions

Sources

  1. Intel XED v2026.08.23 (commit 0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model.
  2. The CPU data of x86-64.net: Zen 3 to Zen 6, from GCC’s -march feature sets and AMD’s Processor Programming References, which the page of each processor cites.
  3. LLVM 23.1.2's x86 scheduling models (commit 85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them.
  4. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2A, page 3-58 (AESKEYGENASSIST)
  5. Software Optimization Guide for the AMD Zen5 Microarchitecture (58455, rev. 1.00, August 2024), Wayback Machine copy of AMD's ZIP

The tables are derived from Intel XED, Copyright Intel Corporation, licensed under the Apache License 2.0; x86-64.net converted and reformatted them. The timings come from LLVM's scheduling models, part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.