Introduction
These instructions copy values: between general registers, between a register and
memory, to and from the stack, into segment registers, and to and from I/O ports. They
work on the general registers (AL to R31, by operand size), the segment registers and
the stack pointer. Most leave the flags alone. The exceptions are
xadd, cmpxchg, cmpxchg8b and
cmpxchg16b, which set them, and the conditional moves, which read
them.
Most of them are as old as the 8086. The 80386 added the sign- and zero-extending moves, the Pentium Pro the conditional moves, and x86-64 the 64-bit forms. Intel’s APX (Advanced Performance Extensions) adds two-register pushes and pops, a conditional-faulting move and EVEX forms of SETcc, which the disassembler files here. A program checks for CMOVcc with CPUID leaf 1, EDX bit 15; for CMPXCHG8B with leaf 1, EDX bit 8; for CMPXCHG16B with leaf 1, ECX bit 13; for MOVBE with leaf 1, ECX bit 22; and for APX with leaf 7, sub-leaf 1, EDX bit 21.
The string moves (movsb, stosd …) are on the
String instructions page, and the moves to and
from control and debug registers on the
System instructions page.
The instructions
In the forms, r/m16/32/64 is a general register or memory in ModRM.r/m,
of the operand size; r16/32/64 a general register in ModRM.reg;
imm8 to imm64 an immediate; moffs a memory
offset in the instruction. In the encodings, /r means a ModRM byte with a
register in its reg field, /0 to /7 a ModRM byte whose reg
field extends the opcode, +rb, +rw and +rd a
register number added to the opcode, and ib, iw,
id and io an immediate of 1, 2, 4 or 8 bytes. See
Instruction encoding.
Moves
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
mov | r/m8, r8r/m16/32/64, r16/32/64r8, r/m8r16/32/64, r/m16/32/64r/m16, SregSreg, r/m16AL/AX/EAX, moffsmoffs, AL/AX/EAXr8, imm8r16/32, imm16/32r/m8, imm8r/m16/32/64, imm16/32 | 88 /r89 /r8A /r8B /r8C /r8E /rA0, A1A2, A3B0+rb ibB8+rw iw, B8+rd idC6 /0 ibC7 /0 iw/id | Copies the source to the destination. With REX.W, C7 /0 sign-extends its 32-bit immediate to 64 bits. A move into SS holds off interrupts until after the next instruction, so that a following move into the stack pointer is not interrupted. CS cannot be loaded this way: 8E with CS (reg field 1) raises #UD, though the disassembler still shows it. | 8086 (Intel 8086, 1978) |
movabs | AL/AX/EAX/RAX, moffs64moffs64, AL/AX/EAX/RAXr64, imm64 | A0 to A3 (64-bit mode)REX.W B8+rd io | LLVM’s name for the MOV forms whose address or immediate is 64 bits: the accumulator moves to and from an 8-byte absolute address, and the load of a full 64-bit immediate. With a 67 prefix the address is 4 bytes and the instruction is shown as mov. 64-bit mode only. | x86-64 (AMD Opteron, 2003, and Intel EM64T, 2004); the decoder files it under 8086 MOV |
movzx | r16/32/64, r/m8r32/64, r/m16 | 0F B6 /r0F B7 /r | Copies a byte or word and fills the upper bits of the destination with zeros. There is no 32-to-64-bit form: a 32-bit mov already clears the upper half. | 80386 (Intel 80386, 1985) |
movsx | r16/32/64, r/m8r32/64, r/m16 | 0F BE /r0F BF /r | Copies a byte or word and fills the upper bits of the destination with copies of its sign bit. | 80386 (Intel 80386, 1985) |
movsxd | r64, r/m32r32, r/m32 | REX.W 63 /r63 /r | Sign-extends a doubleword to 64 bits. Without REX.W it is a plain 32-bit move, which Intel advises against. 64-bit mode only: elsewhere 63 is arpl. | x86-64 (AMD Opteron, 2003, and Intel EM64T, 2004) |
movbe | r16/32/64, m16/32/64m16/32/64, r16/32/64(APX) r, r/m and r/m, r | 0F 38 F0 /r0F 38 F1 /rEVEX.MAP4 60 /r, 61 /r | Loads or stores a value with its bytes in reverse order, converting between little- and big-endian. The legacy forms take only memory; the APX forms also take two registers. | MOVBE (Intel Atom, 2008) |
xchg | r/m8, r8r/m16/32/64, r16/32/64rAX, r16/32/64 | 86 /r87 /r90+rw, 90+rd | Swaps the two operands. With a memory operand the exchange is locked whether or not a LOCK prefix is present. 90 on its own is nop; with REX.B it is xchg r8, rax. | 8086 (Intel 8086, 1978) |
bswap | r32r64 | 0F C8+rdREX.W 0F C8+rd | Reverses the order of the bytes in a register. With a 16-bit operand size the result is undefined in Intel’s manual; the disassembler shows it as bswap ax. | 80486 (Intel 80486, 1989) |
xadd | r/m8, r8r/m16/32/64, r16/32/64 | 0F C0 /r0F C1 /r | Exchanges the operands, then puts their sum in the destination: the source register ends up with the old value. Sets the flags as add does. With LOCK it is an atomic fetch-and-add. | 80486 (Intel 80486, 1989) |
cmpxchg | r/m8, r8r/m16/32/64, r16/32/64 | 0F B0 /r0F B1 /r | Compares AL, AX, EAX or RAX with the destination. If they are equal, sets ZF and writes the source to the destination; otherwise clears ZF and loads the destination into the accumulator. The other flags are set as cmp sets them. With LOCK it is an atomic compare-and-swap. | 80486 (Intel 80486, 1989) |
cmpxchg8b | m64 | 0F C7 /1 | Compares EDX:EAX with the quadword in memory. If equal, sets ZF and stores ECX:EBX there; otherwise clears ZF and loads it into EDX:EAX. Only ZF changes. Memory operand only. | Pentium (Intel Pentium, 1993) |
cmpxchg16b | m128 | REX.W 0F C7 /1 | The same with RDX:RAX, RCX:RBX and 16 bytes of memory, which must be 16-byte aligned (#GP otherwise). 64-bit mode. | CMPXCHG16B (later x86-64 processors; the first AMD64 processors did not have it) |
Condition codes
The conditional moves, the conditional jumps and SETcc share sixteen conditions, numbered by the low four bits of the opcode. The disassembler uses LLVM’s names, the first in each row; Intel’s manual and assemblers accept the others too.
| cc | Name | Other names | True when |
|---|---|---|---|
0 | o | – | OF = 1 (overflow) |
1 | no | – | OF = 0 |
2 | b | c, nae | CF = 1 (below, unsigned) |
3 | ae | nb, nc | CF = 0 |
4 | e | z | ZF = 1 (equal) |
5 | ne | nz | ZF = 0 |
6 | be | na | CF = 1 or ZF = 1 |
7 | a | nbe | CF = 0 and ZF = 0 (above, unsigned) |
8 | s | – | SF = 1 (negative) |
9 | ns | – | SF = 0 |
A | p | pe | PF = 1 (even parity) |
B | np | po | PF = 0 |
C | l | nge | SF ≠ OF (less, signed) |
D | ge | nl | SF = OF |
E | le | ng | ZF = 1 or SF ≠ OF |
F | g | nle | ZF = 0 and SF = OF (greater, signed) |
Conditional moves
CMOVcc copies its source to its destination when the condition holds. A memory
source is read whether or not the condition holds, so it can fault. In 64-bit mode a
32-bit CMOVcc clears the upper half of the destination even when the condition is
false. APX adds a form with a new destination, cmovcc r, r, r/m
(EVEX map 4, ND = 1), which writes the second operand or the third to the first.
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
cmovo | r16/32/64, r/m16/32/64 | 0F 40 /r | Moves if OF = 1. | Pentium Pro (Intel Pentium Pro, 1995) |
cmovno | r16/32/64, r/m16/32/64 | 0F 41 /r | Moves if OF = 0. | Pentium Pro (Intel Pentium Pro, 1995) |
cmovb | r16/32/64, r/m16/32/64 | 0F 42 /r | Moves if CF = 1 (below). | Pentium Pro (Intel Pentium Pro, 1995) |
cmovae | r16/32/64, r/m16/32/64 | 0F 43 /r | Moves if CF = 0 (above or equal). | Pentium Pro (Intel Pentium Pro, 1995) |
cmove | r16/32/64, r/m16/32/64 | 0F 44 /r | Moves if ZF = 1 (equal). | Pentium Pro (Intel Pentium Pro, 1995) |
cmovne | r16/32/64, r/m16/32/64 | 0F 45 /r | Moves if ZF = 0 (not equal). | Pentium Pro (Intel Pentium Pro, 1995) |
cmovbe | r16/32/64, r/m16/32/64 | 0F 46 /r | Moves if CF = 1 or ZF = 1 (below or equal). | Pentium Pro (Intel Pentium Pro, 1995) |
cmova | r16/32/64, r/m16/32/64 | 0F 47 /r | Moves if CF = 0 and ZF = 0 (above). | Pentium Pro (Intel Pentium Pro, 1995) |
cmovs | r16/32/64, r/m16/32/64 | 0F 48 /r | Moves if SF = 1. | Pentium Pro (Intel Pentium Pro, 1995) |
cmovns | r16/32/64, r/m16/32/64 | 0F 49 /r | Moves if SF = 0. | Pentium Pro (Intel Pentium Pro, 1995) |
cmovp | r16/32/64, r/m16/32/64 | 0F 4A /r | Moves if PF = 1. | Pentium Pro (Intel Pentium Pro, 1995) |
cmovnp | r16/32/64, r/m16/32/64 | 0F 4B /r | Moves if PF = 0. | Pentium Pro (Intel Pentium Pro, 1995) |
cmovl | r16/32/64, r/m16/32/64 | 0F 4C /r | Moves if SF ≠ OF (less). | Pentium Pro (Intel Pentium Pro, 1995) |
cmovge | r16/32/64, r/m16/32/64 | 0F 4D /r | Moves if SF = OF (greater or equal). | Pentium Pro (Intel Pentium Pro, 1995) |
cmovle | r16/32/64, r/m16/32/64 | 0F 4E /r | Moves if ZF = 1 or SF ≠ OF (less or equal). | Pentium Pro (Intel Pentium Pro, 1995) |
cmovg | r16/32/64, r/m16/32/64 | 0F 4F /r | Moves if ZF = 0 and SF = OF (greater). | Pentium Pro (Intel Pentium Pro, 1995) |
Conditional-faulting moves (APX)
CFCMOVcc is a conditional move that does not touch memory when its condition is false, so a load or store that would fault simply does not happen. It shares EVEX map 4’s opcodes 40 to 4F with CMOVcc, and EVEX.ND and EVEX.NF pick the form:
- ND = 0, NF = 0:
cfcmovcc r, r/mloads the source if the condition holds, and otherwise writes zero to the register; - ND = 0, NF = 1:
cfcmovcc r/m, rstores the register only if the condition holds; - ND = 1, NF = 1:
cfcmovcc r, r, r/mwrites the third operand to the first if the condition holds, else the second; - ND = 1, NF = 0 is the new-destination
cmovccabove.
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
cfcmovo | r, r/mr/m, rr, r, r/m | EVEX.MAP4 40 /r | Conditional-faulting move if OF = 1. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmovno | r, r/mr/m, rr, r, r/m | EVEX.MAP4 41 /r | Conditional-faulting move if OF = 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmovb | r, r/mr/m, rr, r, r/m | EVEX.MAP4 42 /r | Conditional-faulting move if CF = 1. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmovae | r, r/mr/m, rr, r, r/m | EVEX.MAP4 43 /r | Conditional-faulting move if CF = 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmove | r, r/mr/m, rr, r, r/m | EVEX.MAP4 44 /r | Conditional-faulting move if ZF = 1. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmovne | r, r/mr/m, rr, r, r/m | EVEX.MAP4 45 /r | Conditional-faulting move if ZF = 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmovbe | r, r/mr/m, rr, r, r/m | EVEX.MAP4 46 /r | Conditional-faulting move if CF = 1 or ZF = 1. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmova | r, r/mr/m, rr, r, r/m | EVEX.MAP4 47 /r | Conditional-faulting move if CF = 0 and ZF = 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmovs | r, r/mr/m, rr, r, r/m | EVEX.MAP4 48 /r | Conditional-faulting move if SF = 1. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmovns | r, r/mr/m, rr, r, r/m | EVEX.MAP4 49 /r | Conditional-faulting move if SF = 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmovp | r, r/mr/m, rr, r, r/m | EVEX.MAP4 4A /r | Conditional-faulting move if PF = 1. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmovnp | r, r/mr/m, rr, r, r/m | EVEX.MAP4 4B /r | Conditional-faulting move if PF = 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmovl | r, r/mr/m, rr, r, r/m | EVEX.MAP4 4C /r | Conditional-faulting move if SF ≠ OF. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmovge | r, r/mr/m, rr, r, r/m | EVEX.MAP4 4D /r | Conditional-faulting move if SF = OF. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmovle | r, r/mr/m, rr, r, r/m | EVEX.MAP4 4E /r | Conditional-faulting move if ZF = 1 or SF ≠ OF. | APX (announced for Intel Nova Lake and Diamond Rapids) |
cfcmovg | r, r/mr/m, rr, r, r/m | EVEX.MAP4 4F /r | Conditional-faulting move if ZF = 0 and SF = OF. | APX (announced for Intel Nova Lake and Diamond Rapids) |
Sign extension of the accumulator
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
cbw | – | 98 (16-bit operand size) | Sign-extends AL into AX. | 8086 (Intel 8086, 1978) |
cwde | – | 98 (32-bit operand size) | Sign-extends AX into EAX. | 80386 (Intel 80386, 1985) |
cdqe | – | REX.W 98 | Sign-extends EAX into RAX. | x86-64 (AMD Opteron, 2003, and Intel EM64T, 2004) |
cwd | – | 99 (16-bit operand size) | Fills DX with copies of the sign bit of AX, making DX:AX, as needed before a 16-bit idiv. | 8086 (Intel 8086, 1978) |
cdq | – | 99 (32-bit operand size) | Fills EDX with copies of the sign bit of EAX, making EDX:EAX. | 80386 (Intel 80386, 1985) |
cqo | – | REX.W 99 | Fills RDX with copies of the sign bit of RAX, making RDX:RAX. | x86-64 (AMD Opteron, 2003, and Intel EM64T, 2004) |
The stack
The stack grows down from SS:SP, SS:ESP or RSP. In 64-bit mode PUSH and POP are 64-bit by default; a 66 prefix makes them 16-bit, and there is no 32-bit form.
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
push | r/m16/32/64r16/32/64imm8, imm16/32ES, CS, SS, DSFS, GS | FF /650+rw, 50+rd6A ib, 68 iw/id06, 0E, 16, 1E0F A0, 0F A8 | Lowers the stack pointer by the operand size and stores the operand there. An 8-bit immediate is sign-extended. The pushes of ES, CS, SS and DS are invalid in 64-bit mode. The immediate forms came with the 80186, FS and GS with the 80386. | 8086 (Intel 8086, 1978) |
pop | r/m16/32/64r16/32/64ES, SS, DSFS, GS | 8F /058+rw, 58+rd07, 17, 1F0F A1, 0F A9 | Loads the operand from the top of the stack and raises the stack pointer. A pop into SS holds off interrupts until after the next instruction. There is no POP CS: the 8086 ran 0F as one, and later processors use it as the two-byte escape. The pops of ES, SS and DS are invalid in 64-bit mode. | 8086 (Intel 8086, 1978) |
pushaw | – | 60 (16-bit operand size) | Intel’s PUSHA: pushes AX, CX, DX, BX, the value SP had before the instruction, BP, SI and DI. Invalid in 64-bit mode. | 80186 (Intel 80186, 1982) |
pushal | – | 60 (32-bit operand size) | Intel’s PUSHAD: the same with EAX to EDI. Invalid in 64-bit mode. | 80386 (Intel 80386, 1985); the decoder files it under 80186 PUSHA |
popaw | – | 61 (16-bit operand size) | Intel’s POPA: pops DI, SI, BP, then skips the saved SP, then pops BX, DX, CX and AX. Invalid in 64-bit mode. | 80186 (Intel 80186, 1982) |
popal | – | 61 (32-bit operand size) | Intel’s POPAD: the same with EDI to EAX. Invalid in 64-bit mode. | 80386 (Intel 80386, 1985); the decoder files it under 80186 POPA |
pushp | r64 | REX2.W1 50+rd | PUSH with APX’s push-pop acceleration hint (PPX): it tells the processor that this push will be matched by a popp, so the pair can be tracked. Otherwise the same as push r64. | APX (announced for Intel Nova Lake and Diamond Rapids) |
popp | r64 | REX2.W1 58+rd | POP with the PPX hint, matching a pushp. | APX (announced for Intel Nova Lake and Diamond Rapids) |
push2 | r64, r64 | EVEX.MAP4 FF /6, ND = 1, W0 (the first register in vvvv, the second in ModRM.r/m) | Pushes two 64-bit registers with one 16-byte store. RSP must be 16-byte aligned, or the instruction raises #GP. 64-bit mode only. | APX (announced for Intel Nova Lake and Diamond Rapids) |
push2p | r64, r64 | EVEX.MAP4 FF /6, ND = 1, W1 | push2 with the PPX hint. | APX (announced for Intel Nova Lake and Diamond Rapids) |
pop2 | r64, r64 | EVEX.MAP4 8F, ND =1, W0 | Pops two 64-bit registers with one 16-byte load, the counterpart of push2. RSP must be 16-byte aligned. | APX (announced for Intel Nova Lake and Diamond Rapids) |
pop2p | r64, r64 | EVEX.MAP4 8F, ND =1, W1 | pop2 with the PPX hint. | APX (announced for Intel Nova Lake and Diamond Rapids) |
Loading a far pointer
These load a segment register and a general register together from a far pointer in memory: the offset first (2, 4 or 8 bytes, by the operand size), then the 2-byte selector.
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
lds | r16/32, m16:16/m16:32 | C5 /r | Loads DS and the register. Invalid in 64-bit mode, where C5 starts a two-byte VEX prefix; in 32-bit code a C5 followed by a byte with both top bits set is VEX too. | 8086 (Intel 8086, 1978) |
les | r16/32, m16:16/m16:32 | C4 /r | Loads ES and the register. Invalid in 64-bit mode, where C4 starts a three-byte VEX prefix. | 8086 (Intel 8086, 1978) |
lfs | r16/32/64, m16:16/32/64 | 0F B4 /r | Loads FS and the register. | 80386 (Intel 80386, 1985) |
lgs | r16/32/64, m16:16/32/64 | 0F B5 /r | Loads GS and the register. | 80386 (Intel 80386, 1985) |
lss | r16/32/64, m16:16/32/64 | 0F B2 /r | Loads SS and the register, normally the stack pointer, in one step. | 80386 (Intel 80386, 1985) |
Input and output
These read and write the processor’s separate 64 K space of I/O ports. In protected mode they are allowed when CPL ≤ IOPL, or when the task’s I/O permission bitmap allows the port; otherwise they raise #GP.
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
in | AL, imm8AX/EAX, imm8AL, DXAX/EAX, DX | E4 ibE5 ibECED | Reads a byte, word or doubleword from the port numbered by the immediate (0 to 255) or by DX. | 8086 (Intel 8086, 1978) |
out | imm8, ALimm8, AX/EAXDX, ALDX, AX/EAX | E6 ibE7 ibEEEF | Writes a byte, word or doubleword to the port. | 8086 (Intel 8086, 1978) |
SETcc and SETZUcc in EVEX form (APX)
APX gives SETcc an EVEX form in map 4 (F2 prefix, opcode 40 + cc, W0), so that it
can write the low byte of R16 to R31. LLVM shows it with {evex} before
the mnemonic, as it does every APX form that reads the same as a legacy instruction.
With EVEX.ND = 1 it is SETZUcc, which also clears bits 8 to 63 of a register
destination, saving the movzx that usually follows a SETcc. The
legacy SETcc (0F 90 to 9F) is on the
Logic page.
| Instruction | Forms | Encoding | What it does | Set |
|---|---|---|---|---|
seto | r/m8 | EVEX.MAP4.F2 40, ND =0 | Writes 1 if OF = 1, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setno | r/m8 | EVEX.MAP4.F2 41, ND =0 | Writes 1 if OF = 0, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setb | r/m8 | EVEX.MAP4.F2 42, ND =0 | Writes 1 if CF = 1, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setae | r/m8 | EVEX.MAP4.F2 43, ND =0 | Writes 1 if CF = 0, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
sete | r/m8 | EVEX.MAP4.F2 44, ND =0 | Writes 1 if ZF = 1, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setne | r/m8 | EVEX.MAP4.F2 45, ND =0 | Writes 1 if ZF = 0, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setbe | r/m8 | EVEX.MAP4.F2 46, ND =0 | Writes 1 if CF = 1 or ZF = 1, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
seta | r/m8 | EVEX.MAP4.F2 47, ND =0 | Writes 1 if CF = 0 and ZF = 0, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
sets | r/m8 | EVEX.MAP4.F2 48, ND =0 | Writes 1 if SF = 1, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setns | r/m8 | EVEX.MAP4.F2 49, ND =0 | Writes 1 if SF = 0, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setp | r/m8 | EVEX.MAP4.F2 4A, ND =0 | Writes 1 if PF = 1, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setnp | r/m8 | EVEX.MAP4.F2 4B, ND =0 | Writes 1 if PF = 0, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setl | r/m8 | EVEX.MAP4.F2 4C, ND =0 | Writes 1 if SF ≠ OF, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setge | r/m8 | EVEX.MAP4.F2 4D, ND =0 | Writes 1 if SF = OF, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setle | r/m8 | EVEX.MAP4.F2 4E, ND =0 | Writes 1 if ZF = 1 or SF ≠ OF, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setg | r/m8 | EVEX.MAP4.F2 4F, ND =0 | Writes 1 if ZF = 0 and SF = OF, else 0. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzuo | r/m8 | EVEX.MAP4.F2 40, ND =1 | As seto, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzuno | r/m8 | EVEX.MAP4.F2 41, ND =1 | As setno, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzub | r/m8 | EVEX.MAP4.F2 42, ND =1 | As setb, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzuae | r/m8 | EVEX.MAP4.F2 43, ND =1 | As setae, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzue | r/m8 | EVEX.MAP4.F2 44, ND =1 | As sete, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzune | r/m8 | EVEX.MAP4.F2 45, ND =1 | As setne, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzube | r/m8 | EVEX.MAP4.F2 46, ND =1 | As setbe, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzua | r/m8 | EVEX.MAP4.F2 47, ND =1 | As seta, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzus | r/m8 | EVEX.MAP4.F2 48, ND =1 | As sets, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzuns | r/m8 | EVEX.MAP4.F2 49, ND =1 | As setns, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzup | r/m8 | EVEX.MAP4.F2 4A, ND =1 | As setp, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzunp | r/m8 | EVEX.MAP4.F2 4B, ND =1 | As setnp, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzul | r/m8 | EVEX.MAP4.F2 4C, ND =1 | As setl, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzuge | r/m8 | EVEX.MAP4.F2 4D, ND =1 | As setge, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzule | r/m8 | EVEX.MAP4.F2 4E, ND =1 | As setle, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
setzug | r/m8 | EVEX.MAP4.F2 4F, ND =1 | As setg, and clears the rest of a register destination. | APX (announced for Intel Nova Lake and Diamond Rapids) |
Notes
- Flags. MOV, MOVZX, MOVSX, MOVSXD, MOVBE, XCHG, BSWAP, CMOVcc, PUSH, POP, the far-pointer loads, IN and OUT leave the flags alone. XADD sets them as ADD, CMPXCHG as CMP, and CMPXCHG8B and CMPXCHG16B change only ZF.
- 64-bit mode. Writing a 32-bit register clears the upper half of its 64-bit register; writing an 8-bit or 16-bit one leaves the rest alone. The instructions marked invalid in 64-bit mode raise #UD there, and the disassembler shows their bytes as whatever they mean in 64-bit code (C4 and C5 as VEX, for instance).
- LOCK. XCHG with memory is always locked. XADD, CMPXCHG, CMPXCHG8B and CMPXCHG16B may take LOCK when their destination is memory; LOCK on any other instruction here raises #UD, which the explorer reports as an issue.
- Display. A 64-bit memory offset (moffs64) is shown unsigned, as an address, as LLVM shows it. A disp16 alone is shown unsigned as well.
- APX forms are for 64-bit mode only. The APX encodings here give the EVEX map and opcode; the APX specification gives the full field notation, and the Instruction encoding page explains ND, NF and the extended register fields.
Links
Reference
- Intel 64 and IA-32 Architectures Software Developer’s Manuals – Intel’s manuals; volume 2 describes each instruction
- AMD64 Architecture Programmer’s Manual, Volume 3 – AMD’s reference to the general-purpose and system instructions
- Intel Advanced Performance Extensions (Intel APX) – Intel’s introduction to APX, with a link to its architecture specification
- x86 and amd64 instruction reference – Félix Cloutier’s web copy of the instruction pages of Intel’s manual