Instruction
IMUL
Multiplies signed integers in one-, two- and three-operand forms; APX adds new-destination, flag-preserving and zero-upper immediate forms.
- Extensions
- Forms
- 36 (10 Legacy, 26 EVEX)
- Data
- Intel XED v2026.08.23
IMUL is the signed multiplication, in three shapes:
- One operand,
imul rsi: rAX times the operand, with the whole product, twice as wide, in rDX:rAX (in AX for bytes). It is the only form that yields the upper half. - Two operands,
imul rax, rsi: the destination times the source, cut to the destination’s width. - Three operands,
imul rax, rdi, 100: a register or memory operand times an 8- or 32-bit immediate, sign-extended, into another register.
Only the one-operand shape exists for bytes.
Signed and unsigned
The lower half of a product is the same whether the inputs count as
signed or unsigned, so the cut-down forms serve both: GCC 14 and
Clang 23 at -O2 compile a * b on unsigned long to
imul rax, rsi. Only the upper half differs. For it, signed code uses
the one-operand IMUL and unsigned code MUL, which has no
other shape, or MULX from BMI2, which takes its
registers freely and leaves the flags alone. Both compilers turn
(unsigned __int128)a * b into MUL, and Clang into MULX when allowed
BMI2; the signed version becomes a one-operand IMUL.
Overflow
CF and OF are set together when the signed product does not fit in
the destination; for the one-operand form, when the upper half is
anything but the sign extension of the lower. __builtin_mul_overflow
on two longs is therefore IMUL followed by seto. For unsigned
operands those flags answer the wrong question, and both compilers use
MUL instead, whose flags tell whether the upper half is nonzero.
Constants
A multiplication by a constant may become an IMUL with an immediate or
a few LEA, shift and add
instructions: for x * 100, Clang emits imul rax, rdi, 100 and GCC
two LEAs and a SAL. Division by a constant turns into a multiplication
as well, keeping the high bits of the product (see
DIV).
APX
APX adds a form with a new destination register and two sources, forms that leave the flags unchanged (NF), and, for the immediate forms, ZU: with EVEX.ND set, a 16-bit result clears bits 63:16 of its register instead of keeping them.
In the optimization guide
What the optimization guide says about IMUL, a line per claim. Each links to the claim in the guide, with its sources and where they differ.
Bulldozer to Excavator
- Integer execution: EX1’s pipelined multiplier takes 4 cycles for operands of up to 32 bits, starting one every 2 cycles, and 6 for 64-bit operands, starting one every 4; LLVM’s model agrees.
Golden Cove and Raptor Cove
- Integer execution: A MUL of 64 by 64 bits into RDX:RAX is two micro-ops: the low half on port 1 and the high half on port 5, four cycles in LLVM’s models against three for an IMUL that keeps only the low half.
Jaguar and Puma
- Integer execution: The pipelined multiplier takes 3 cycles for operands of up to 32 bits, one a cycle, and 6 for 64-bit ones, one every 4; a form that writes two registers, such as MUL, adds a cycle to both. sources differ
Sandy Bridge and Ivy Bridge
- Integer and vector execution: Separate multipliers serve general-purpose and vector registers: a general-purpose multiply runs on port 1 at a latency of 3 cycles, a vector one on port 0 at 5 cycles for any precision, and both run one operation a cycle.
Silvermont to Goldmont Plus
- Out-of-order and in-order execution: On Silvermont shifts and rotates run on integer port 0, and jumps, multiplication,
popcnt,crc32and bit operations on port 1. sources differ - Out-of-order and in-order execution: On Silvermont the widening one-operand mul and imul come from microcode; use the two-operand imul where the high half is not needed.
Skylake to Cooper Lake
- Integer execution: A MUL of 64 by 64 bits into RDX:RAX is two micro-ops on ports 1 and 5 and takes four cycles in LLVM’s models, against three for an IMUL that keeps only the low half.
Tremont
- Integer execution: Three ALU ports run simple integer operations, three a cycle; shifts go to port 00 only, and multiplication, division,
popcnt,crc32and the bit operations to port 01 only.
Zen and Zen+
- Integer execution: One ALU multiplies, up to 64 by 64 bits in three cycles, pipelined; a multiplication with two destination registers delivers the second a cycle later and starts only every other cycle. sources differ
Zen 2
- Integer execution: One ALU multiplies, 64 by 64 bits in three cycles and pipelined; a multiplication that writes two registers delivers the second a cycle later and starts only every other cycle.
Zen 3
- Integer execution: Only ALU 1 multiplies, 64 by 64 bits in three cycles and pipelined; a multiplication that writes two registers delivers the second one a cycle later.
Zen 4
- Integer execution: Only one ALU multiplies, 64 by 64 bits in three cycles and pipelined; a multiplication that writes two registers delivers the second one a cycle later.
Zen 5
- Integer execution: Three ALUs multiply, 64 by 64 bits in three cycles; a multiplication that writes two registers delivers the second one a cycle later.
Forms
| Instruction | Encoding | Requires |
|---|---|---|
IMUL m8
IMUL_MEMb | F6 /5 | Base instruction set |
IMUL r8
IMUL_GPR8 | F6 /5 | Base instruction set |
IMUL m16/32/64
IMUL_MEMv | F7 /5 | Base instruction set |
IMUL r16/32/64
IMUL_GPRv | F7 /5 | Base instruction set |
IMUL r16/32/64, m16/32/64, imm16/32
IMUL_GPRv_MEMv_IMMz | 69 /r iw/id | Base instruction set |
IMUL r16/32/64, r16/32/64, imm16/32
IMUL_GPRv_GPRv_IMMz | 69 /r iw/id | Base instruction set |
IMUL r16/32/64, m16/32/64, imm8
IMUL_GPRv_MEMv_IMMb | 6B /r ib | Base instruction set |
IMUL r16/32/64, r16/32/64, imm8
IMUL_GPRv_GPRv_IMMb | 6B /r ib | Base instruction set |
IMUL r16/32/64, m16/32/64
IMUL_GPRv_MEMv | 0F AF /r | Base instruction set |
IMUL r16/32/64, r16/32/64
IMUL_GPRv_GPRv | 0F AF /r | Base instruction set |
IMUL r16/32/64, r16/32/64, imm16/32
IMUL_GPRv_GPRv_IMMz_APX | EVEX.LLZ.NP.MAP4.SCALABLE 69 /r iw/id | APX_F |
IMUL r16/32/64, m16/32/64, imm16/32
IMUL_GPRv_MEMv_IMMz_APX | EVEX.LLZ.NP.MAP4.SCALABLE 69 /r iw/id | APX_F |
IMUL r16/32/64, r16/32/64, imm16/32 ZU NF optional
IMUL_GPRv_GPRv_IMMz_APX_N3_ZU | EVEX.LLZ.NP.MAP4.SCALABLE 69 /r iw/id ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
IMUL r16/32/64, m16/32/64, imm16/32 ZU NF optional
IMUL_GPRv_MEMv_IMMz_APX_N3_ZU | EVEX.LLZ.NP.MAP4.SCALABLE 69 /r iw/id ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
IMUL r16/32/64, r16/32/64, imm16/32 NF
IMUL_GPRv_GPRv_IMMz_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE 69 /r iw/id NF=1 | APX_F + APX_NCI_NDD_NF |
IMUL r16/32/64, m16/32/64, imm16/32 NF
IMUL_GPRv_MEMv_IMMz_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE 69 /r iw/id NF=1 | APX_F + APX_NCI_NDD_NF |
IMUL r16/32/64
IMUL_GPRv_APX | EVEX.LLZ.NP.MAP4.SCALABLE F7 /5 | APX_F |
IMUL m16/32/64
IMUL_MEMv_APX | EVEX.LLZ.NP.MAP4.SCALABLE F7 /5 | APX_F |
IMUL r16/32/64 NF
IMUL_GPRv_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE F7 /5 NF=1 | APX_F + APX_NCI_NDD_NF |
IMUL m16/32/64 NF
IMUL_MEMv_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE F7 /5 NF=1 | APX_F + APX_NCI_NDD_NF |
IMUL r16/32/64, r16/32/64, imm8
IMUL_GPRv_GPRv_IMM8_APX | EVEX.LLZ.NP.MAP4.SCALABLE 6B /r ib | APX_F |
IMUL r16/32/64, m16/32/64, imm8
IMUL_GPRv_MEMv_IMM8_APX | EVEX.LLZ.NP.MAP4.SCALABLE 6B /r ib | APX_F |
IMUL r16/32/64, r16/32/64, imm8 ZU NF optional
IMUL_GPRv_GPRv_IMM8_APX_N3_ZU | EVEX.LLZ.NP.MAP4.SCALABLE 6B /r ib ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
IMUL r16/32/64, m16/32/64, imm8 ZU NF optional
IMUL_GPRv_MEMv_IMM8_APX_N3_ZU | EVEX.LLZ.NP.MAP4.SCALABLE 6B /r ib ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
IMUL r16/32/64, r16/32/64, imm8 NF
IMUL_GPRv_GPRv_IMM8_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE 6B /r ib NF=1 | APX_F + APX_NCI_NDD_NF |
IMUL r16/32/64, m16/32/64, imm8 NF
IMUL_GPRv_MEMv_IMM8_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE 6B /r ib NF=1 | APX_F + APX_NCI_NDD_NF |
IMUL r16/32/64, r16/32/64
IMUL_GPRv_GPRv_APX | EVEX.LLZ.NP.MAP4.SCALABLE AF /r | APX_F |
IMUL r16/32/64, m16/32/64
IMUL_GPRv_MEMv_APX | EVEX.LLZ.NP.MAP4.SCALABLE AF /r | APX_F |
IMUL r16/32/64, r16/32/64 NF
IMUL_GPRv_GPRv_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE AF /r NF=1 | APX_F + APX_NCI_NDD_NF |
IMUL r16/32/64, m16/32/64 NF
IMUL_GPRv_MEMv_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE AF /r NF=1 | APX_F + APX_NCI_NDD_NF |
IMUL r16/32/64, r16/32/64, r16/32/64 NDD NF optional
IMUL_GPRv_GPRv_GPRv_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE AF /r ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
IMUL r16/32/64, r16/32/64, m16/32/64 NDD NF optional
IMUL_GPRv_GPRv_MEMv_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE AF /r ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
IMUL r8
IMUL_GPR8i8_APX | EVEX.LLZ.NP.MAP4.WIG F6 /5 | APX_F |
IMUL m8
IMUL_MEMi8_APX | EVEX.LLZ.NP.MAP4.WIG F6 /5 | APX_F |
IMUL r8 NF
IMUL_GPR8i8_APX_N3 | EVEX.LLZ.NP.MAP4.WIG F6 /5 NF=1 | APX_F + APX_NCI_NDD_NF |
IMUL m8 NF
IMUL_MEMi8_APX_N3 | EVEX.LLZ.NP.MAP4.WIG F6 /5 NF=1 | APX_F + APX_NCI_NDD_NF |
Latency and throughput
| Model | m8 | r8 | m16 | m32 | m64 | r16 | r32 | r64 | r16, m16, imm16r16, m16, imm8 | r32, m32, imm32r32, m32, imm8 | r64, m64, imm32r64, m64, imm8 | r16, r16, imm16r16, r16, imm8 | r32, r32, imm32r32, r32, imm8 | r64, r64, imm32r64, r64, imm8 | r16, m16 | r32, m32 | r64, m64 | r16, r16 | r32, r32 | r64, r64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Sandy Bridge | 8 / 1p1 | 3 / 1p1 | 9 / 1.33p015 | 9 / 1p015 | 9 / 1p01 | 4 / 1.33p015 | 4 / 1p015 | 4 / 1p01 | 8 / 1p015 | 8 / 1p1 | 8 / 1p1 | 4 / 1p015 | 3 / 1p1 | 3 / 1p1 | 8 / 1p1 | 8 / 1p1 | 8 / 1p1 | 3 / 1p1 | 3 / 1p1 | 3 / 1p1 |
| Haswell | 8 / 1p1 | 3 / 1p1 | 9 / 1p0156 | 9 / 1p0156 | 9 / 1p16 | 4 / 1p0156 | 4 / 1p0156 | 4 / 1p16 | 8 / 1p0156 | 8 / 1p1 | 8 / 1p1 | 4 / 1p0156 | 3 / 1p1 | 3 / 1p1 | 8 / 1p1 | 8 / 1p1 | 8 / 1p1 | 3 / 1p1 | 3 / 1p1 | 3 / 1p1 |
| Broadwell, Skylake | 8 / 1p1 | 3 / 1p1 | 9 / 1p0156 | 9 / 1p0156 | 9 / 1p15 | 4 / 1p0156 | 4 / 1p0156 | 4 / 1p15 | 8 / 1p0156 | 8 / 1p1 | 8 / 1p1 | 4 / 1p0156 | 3 / 1p1 | 3 / 1p1 | 8 / 1p1 | 8 / 1p1 | 8 / 1p1 | 3 / 1p1 | 3 / 1p1 | 3 / 1p1 |
| Skylake-SP, Ice Lake | 8 / 1p1 | 3 / 1p1 | 9 / 1p0156 | 9 / 1p0156 | 9 / 1p15 | 4 / 1p0156 | 4 / 1p0156 | 4 / 1p15 | 8 / 1p0156 | 8 / 1p1 | 8 / 1p1 | 4 / 1p0156 | 3 / 1p1 | 3 / 1p1 | 8 / 1p0156 | 8 / 1p1 | 8 / 1p1 | 3 / 1p1 | 3 / 1p1 | 3 / 1p1 |
| Alder Lake, Sapphire Rapids | 8 / 1p1 | 3 / 1p1 | 10 / 1p0 p1 p5 p6 p11 | 9 / 1p0 p1 p5 p6 p11 | 9 / 1p15 | 5 / 1p0 p1 p5 p6 p11 | 4 / 1p0 p1 p5 p6 p11 | 4 / 1p15 | 9 / 1p0 p1 p5 p6 p11 | 8 / 1p1 | 8 / 1p1 | 4 / 1p0 p1 p5 p6 p11 | 3 / 1p1 | 3 / 1p1 | 8 / 1p1 | 8 / 1p1 | 8 / 1p1 | 3 / 1p1 | 3 / 1p1 | 3 / 1p1 |
| Lunar Lake | 7 / 0.33p135 | 3 / 0.33p135 | 9 / 0.67p012345 | 8 / 0.33p012345 | 8 / 0.33p012345 | 5 / 0.67p012345 | 4 / 0.33p012345 | 4 / 0.33p012345 | 8 / 0.33p012345 | 6 / 0.33p012345 | 6 / 0.33p012345 | 4 / 0.33p012345 | 2 / 0.33p012345 | 2 / 0.33p012345 | 7 / 0.33p135 | 7 / 0.33p135 | 7 / 0.33p135 | 3 / 0.33p135 | 3 / 0.33p135 | 3 / 0.33p135 |
| Bonnell | 7 / 7p1 | 7 / 7p01 | 8 / 8p1 | 7 / 7p1 | 12 / 12p1 | 7 / 7p01 | 6 / 6p01 | 12 / 12p01 | 7 / 7p1 | 5 / 5p0 | 14 / 14p1 | 6 / 6p01 | 5 / 5p0 | 14 / 14p01 | 7 / 7p1 | 5 / 5p0 | 12 / 12p1 | 6 / 6p01 | 5 / 5p0 | 12 / 12p01 |
| Silvermont | 8 / 5IEC1 MEC | 5 / 5IEC1 | 8 / 5IEC1 MEC | 8 / 5IEC1 MEC | 10 / 7IEC1 MEC | 5 / 5IEC1 | 5 / 5IEC1 | 7 / 7IEC1 | 7 / 4IEC1 MEC | 6 / 1IEC1 MEC | 8 / 2IEC1 MEC | 4 / 4IEC1 | 3 / 1IEC1 | 5 / 2IEC1 | 7 / 4IEC1 MEC | 6 / 1IEC1 MEC | 8 / 2IEC1 MEC | 4 / 4IEC1 | 3 / 1IEC1 | 5 / 2IEC1 |
| Piledriver | 8 / 4EX1 Mul | 4 / 4EX1 Mul | 8 / 5EX1 Mul | 8 / 4EX1 Mul | 10 / 6EX1 Mul | 4 / 5EX1 Mul | 4 / 4EX1 Mul | 6 / 6EX1 Mul | 9 / 5EX1 Mul | 8 / 2EX1 Mul | 10 / 4EX1 Mul | 5 / 5EX1 Mul | 4 / 2EX1 Mul | 6 / 4EX1 Mul | 8 / 2EX1 Mul | 8 / 2EX1 Mul | 10 / 4EX1 Mul | 4 / 2EX1 Mul | 4 / 2EX1 Mul | 6 / 4EX1 Mul |
| Zen | 8 / 1ALU1 Mul | 4 / 1ALU1 Mul | 8 / 1ALU1 Mul | 8 / 1ALU1 Mul | 9 / 1ALU1 Mul | 3 / 1ALU1 Mul | 3 / 1ALU1 Mul | 4 / 1ALU1 Mul | 3 / 11ALU1 Mul | 3 / 11ALU1 Mul | 4 / 11ALU1 Mul | 3 / 1ALU1 Mul | 3 / 1ALU1 Mul | 4 / 1ALU1 Mul | 3 / 11ALU1 Mul | 3 / 11ALU1 Mul | 4 / 11ALU1 Mul | 3 / 1ALU1 Mul | 3 / 1ALU1 Mul | 4 / 1ALU1 Mul |
| Zen 2 | 8 / 1ALU1 Mul | 4 / 1ALU1 Mul | 7 / 1ALU1 Mul | 7 / 1ALU1 Mul | 8 / 1ALU1 Mul | 3 / 1ALU1 Mul | 3 / 1ALU1 Mul | 4 / 1ALU1 Mul | 7 / 1ALU1 Mul | 7 / 1ALU1 Mul | 8 / 1ALU1 Mul | 4 / 1ALU1 Mul | 3 / 1ALU1 Mul | 4 / 1ALU1 Mul | 7 / 1ALU1 Mul | 7 / 1ALU1 Mul | 8 / 1ALU1 Mul | 3 / 1ALU1 Mul | 3 / 1ALU1 Mul | 4 / 1ALU1 Mul |
| Zen 3, Zen 4 | 7 / 3ALU1 | 3 / 3ALU1 | 7 / 3ALU1 | 7 / 3ALU1 | 7 / 3ALU1 | 3 / 3ALU1 | 3 / 3ALU1 | 3 / 3ALU1 | 8 / 4ALU1 | 7 / 1ALU1 | 7 / 1ALU1 | 4 / 4ALU1 | 3 / 1ALU1 | 3 / 1ALU1 | 7 / 1ALU1 | 7 / 1ALU1 | 7 / 1ALU1 | 3 / 1ALU1 | 3 / 1ALU1 | 3 / 1ALU1 |
| Jaguar | 6 / 1ALU1 Mul | 3 / 1ALU1 Mul | 6 / 3ALU1 Mul | 6 / 2ALU1 Mul | 9 / 4ALU1 Mul | 3 / 3ALU1 Mul | 3 / 2ALU1 Mul | 6 / 4ALU1 Mul | 7 / 2ALU1 Mul | 6 / 1ALU1 Mul | 9 / 4ALU1 Mul | 4 / 2ALU1 Mul | 3 / 1ALU1 Mul | 6 / 4ALU1 Mul | 6 / 1ALU1 Mul | 6 / 1ALU1 Mul | 9 / 4ALU1 Mul | 3 / 1ALU1 Mul | 3 / 1ALU1 Mul | 6 / 4ALU1 Mul |
- Zen model: the marked memory forms get the register form's latency, without the load, which the model's source calls definitely wrong (X86ScheduleZnver1.td, line 646).
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
IMUL r/m8 IMUL r/m16/32/64p = signed(rAX) * signed(src) # AL, AX, EAX or RAX times the source,
# signed: a product of 2 * OSIZE bits
if OSIZE == 8:
ax = p # AH:AL
else: # EDX and EAX: bits 63:32 cleared
rDX = p >> OSIZE # the high half
rAX = p # the low half
if not nf: # NF=1 (APX) leaves the flags as they were
big = 1 << (OSIZE - 1)
cf = of = not -big <= p < big # the product does not fit in rAX
sf = zf = af = pf = UNDEFINEDRun on AMD Zen 5 (EPYC 9645): 120 cases. The APX forms were not run: none of these processors has APX.
IMUL r16/32/64, r/m16/32/64p = signed(dest) * signed(src)
if not nf: # NF=1 (APX) leaves the flags as they were
big = 1 << (OSIZE - 1)
cf = of = not -big <= p < big # the product does not fit in dest
sf = zf = af = pf = UNDEFINED
dest.write(p) # its low OSIZE bits: the rest is lost
Run on AMD Zen 5 (EPYC 9645): 90 cases. The APX forms were not run: none of these processors has APX.
IMUL r16/32/64, r/m16/32/64, imm16/32 IMUL r16/32/64, r/m16/32/64, imm8p = signed(src) * signed(imm) # imm8, imm16 or imm32 as encoded, signed
if not nf: # NF=1 (APX) leaves the flags as they were
big = 1 << (OSIZE - 1)
cf = of = not -big <= p < big # the product does not fit in dest
sf = zf = af = pf = UNDEFINED
dest.write(p) # its low OSIZE bits: the rest is lost;
# a ZU form (APX) clears bits 63:OSIZE,
# even for 16 bits
Run on AMD Zen 5 (EPYC 9645): 99 cases. The APX forms were not run: none of these processors has APX.
p = signed(src1) * signed(src2)
if not nf: # NF=1 leaves the flags as they were
big = 1 << (OSIZE - 1)
cf = of = not -big <= p < big # the product does not fit in dest
sf = zf = af = pf = UNDEFINED
dest.write(p) # its low OSIZE bits in the new
# destination: bits 63:OSIZE cleared,
# even for 16 bits
Not run on a processor: none of these processors has APX.
Operands
| Operand | Kind | Action |
|---|---|---|
IMUL r/m8 | ||
r/m8 | explicit | read |
AL | implicit | read |
AX | implicit | write |
RFLAGS | implicit | write |
IMUL r/m16/32/64 | ||
r/m16/32/64 | explicit | read |
rAX | implicit | read, write |
rDX | implicit | write |
RFLAGS | implicit | write |
IMUL r16/32/64, r/m16/32/64, imm16/32 IMUL r16/32/64, r/m16/32/64, imm8 | ||
r16/32/64 | explicit | write |
r/m16/32/64 | explicit | read |
imm8/16/32 | explicit | read |
RFLAGS | implicit | write |
IMUL r16/32/64, r/m16/32/64 | ||
r16/32/64 | explicit | read, write |
r/m16/32/64 | explicit | read |
RFLAGS | implicit | write |
IMUL r16/32/64, r/m16/32/64, imm16/32 ZU NF optional IMUL r16/32/64, r/m16/32/64, imm8 ZU NF optional | ||
r16/32/64 | explicit | write |
r/m16/32/64 | explicit | read |
imm8/16/32 | explicit | read |
RFLAGS | implicit | write (NF=0) |
IMUL r16/32/64, r/m16/32/64, imm16/32 NF IMUL r16/32/64, r/m16/32/64, imm8 NF | ||
r16/32/64 | explicit | write |
r/m16/32/64 | explicit | read |
imm8/16/32 | explicit | read |
IMUL r/m16/32/64 NF | ||
r/m16/32/64 | explicit | read |
rAX | implicit | read, write |
rDX | implicit | write |
IMUL r16/32/64, r/m16/32/64 NF | ||
r16/32/64 | explicit | read, write |
r/m16/32/64 | explicit | read |
IMUL r16/32/64, r16/32/64, r/m16/32/64 NDD NF optional | ||
r16/32/64 | explicit | write |
r16/32/64 | explicit | read |
r/m16/32/64 | explicit | read |
RFLAGS | implicit | write (NF=0) |
IMUL r/m8 NF | ||
r/m8 | explicit | read |
AL | implicit | read |
AX | implicit | write |
Flags
| When | OF | SF | ZF | AF | PF | CF |
|---|---|---|---|---|---|---|
| Forms with optional NF | ||||||
| NF=0 | M | U | U | U | U | M |
| NF forms | ||||||
| Not affected | ||||||
| Other forms | ||||||
| M | U | U | U | U | M | |
Exceptions
The exception class is XED's name for the set of exception conditions that a form follows. How to read.
- Legacy forms
- none in XED
- EVEX forms
APX-EVEX-INT
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.
| ISA set | CPUID | Processors |
|---|---|---|
I86 | No CPUID bit: part of the base instruction set. | Every x86-64 processor in XED’s model and Zen 3 to Zen 6 |
I186 | No CPUID bit: part of the base instruction set. | Every x86-64 processor in XED’s model and Zen 3 to Zen 6 |
APX_F | APX_F | Nova Lake, Diamond Rapids |
APX_F_N3 | APX_F + APX_NCI_NDD_NF | Same as APX_F |
More General-purpose instructions
- CDQ
- CDQE
- CLC
- CLD
- CLI
- CMC
- CMP
- CMPS
- CMPXCHG
- CMPXCHG8B
- CPUID
- CQO
- CWD
- CWDE
- DAA
- DAS
- DEC
- DIV
- ENTER
- IDIV
- IN
- INC
- INS
- INT
- INT1
- INT3
- INTO
- IRET
- Jcc
- JCXZ
- JECXZ
- JMP
- JRCXZ
- LDS
- LEA
- LEAVE
- LES
- LFS
- LGS
- LODS
All 109 General-purpose instructions
More APX instructions
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model. - The CPU data of x86-64.net: Zen 3 to Zen 6, from GCC’s
-marchfeature sets and AMD’s Processor Programming References, which the page of each processor cites. - LLVM 23.1.2's x86 scheduling models (commit
85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them. - Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2A, page 3-451 (IMUL)
- Intel Advanced Performance Extensions (Intel APX) Architecture Specification, revision 9.0 (355828-009, August 2026)
- AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and System Instructions (24594, rev. 3.39, October 2026)
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.