mov | copy the second operand into the first |
movzx | copy a smaller value into a larger register and fill the rest with zeros |
movsx | copy a smaller value into a larger register and repeat its sign bit across the rest |
movsxd | copy a 32-bit value into a 64-bit register, repeating its sign bit across the top half |
lea | work out an address and store the address itself, reading no memory at all |
add | add the second operand into the first |
sub | subtract the second operand from the first |
adc | add the second operand and the carry flag into the first |
sbb | subtract the second operand and the carry flag from the first |
inc | add one, leaving the carry flag alone |
dec | subtract one, leaving the carry flag alone |
imul | multiply, reading both values as signed |
mul | multiply rax by the operand, unsigned, with the double-width answer landing in rdx:rax |
div | divide rdx:rax by the operand, unsigned: quotient to rax, remainder to rdx |
idiv | divide rdx:rax by the operand, signed: quotient to rax, remainder to rdx |
cqo | fill rdx with copies of the sign bit of rax, ready for a signed division |
cdq | fill edx with copies of the sign bit of eax, ready for a 32-bit signed division |
cdqe | widen eax to rax, repeating its sign bit |
and | keep only the bits set in both operands |
or | set every bit that is set in either operand |
xor | set every bit that is set in exactly one operand; with the same register twice, this clears it |
shl | shift bits left, which doubles the value once per place; the last bit pushed out lands in CF |
sal | another name for shl |
shr | shift bits right, filling with zeros; the last bit pushed out lands in CF |
sar | shift bits right, repeating the sign bit, which halves a signed value |
rol | rotate bits left: whatever leaves the top comes back in at the bottom |
ror | rotate bits right: whatever leaves the bottom comes back in at the top |
cmp | subtract, set the flags, and throw the answer away |
test | AND, set the flags, and throw the answer away |
bt | copy one chosen bit into the carry flag |
stc | set the carry flag |
clc | clear the carry flag |
cmc | flip the carry flag |
push | move the stack pointer down by eight and store a value there |
pop | load a value from the stack pointer and move the pointer up by eight |
leave | undo a stack frame: rsp takes rbp’s value, then rbp is popped |
jmp | carry on from a different place, always |
nop | do nothing |
ret | hand the answer back to whoever called |
call | remember where to come back to, then carry on somewhere else |
syscall | ask the operating system to do something: rax says what, rdi, rsi, and rdx carry the details |
neg | replace a value with zero minus that value |
not | flip every bit, leaving the flags alone |
xchg | swap two values |
popcnt | count how many bits are set |
tzcnt | count the zero bits below the lowest set bit, which gives its position |
lzcnt | count the zero bits above the highest set bit |
bsf | find the position of the lowest set bit; leaves the destination alone when there is none |
bsr | find the position of the highest set bit; leaves the destination alone when there is none |
movdqu | copy sixteen bytes, from any address |
movdqa | copy sixteen bytes, from an address that must be a multiple of sixteen |
movd | copy four bytes between a vector register and an ordinary one |
movq | copy eight bytes between a vector register and an ordinary one |
pcmpeqb | compare sixteen pairs of bytes at once, filling each lane with ones where they matched |
pmovmskb | collect the top bit of each of sixteen lanes into a sixteen-bit number |
pand | bitwise AND across sixteen bytes |
por | bitwise OR across sixteen bytes |
pxor | bitwise exclusive OR across sixteen bytes; with the same register twice, this clears it |
psubb | subtract sixteen pairs of bytes at once, each lane on its own |
paddb | add sixteen pairs of bytes at once, each lane on its own |
andn | AND the third operand with the complement of the second: keep the bits set in one and clear in the other |
mulx | multiply rdx (or edx) by the third operand, unsigned, without touching the flags: the high half lands in the first operand, the low half in the second |
shlx | shift the second operand left by the count in the third, into the first, leaving the flags alone |
shrx | shift the second operand right by the count in the third, into the first, leaving the flags alone |
sarx | shift the second operand right, keeping its sign, by the count in the third, into the first, leaving the flags alone |
bzhi | copy the second operand with every bit from the position in the third upward cleared |
rorx | rotate the second operand right by a constant, into the first, leaving the flags alone |
bextr | take a field of bits out of the second operand: the third holds the start position in its low byte and the length in the next |
blsr | clear the lowest set bit |
blsi | keep only the lowest set bit |
blsmsk | a mask of ones from bit 0 up to and including the lowest set bit |
xadd | exchange and add: the first operand becomes the sum, the second receives what the first held (with lock, the atomic increment behind a reference count) |
cmpxchg | compare the accumulator (rax, eax, ax, or al) with the first operand: when they are equal, store the second operand there and set ZF; otherwise load the first into the accumulator and clear ZF |
bts | copy a bit into CF, then set it |
btr | copy a bit into CF, then clear it |
btc | copy a bit into CF, then flip it |
bswap | reverse the order of the bytes: little-endian to big-endian and back |
cwd | widen ax into dx:ax, repeating its sign bit |
cwde | widen ax to eax, repeating its sign bit |
cbw | widen al to ax, repeating its sign bit |
ud2 | an instruction that is defined to be undefined: the compiler plants it where a path must never be taken, so reaching it is a crash |
vzeroupper | clear the upper halves of the 256-bit registers; with only the 128-bit halves modeled, nothing changes |
vmovdqu | the AVX spelling of movdqu |
vmovdqa | the AVX spelling of movdqa |
vmovups | copy sixteen bytes (four floats, to the compiler) from any address; the same bytes move either way |
vmovaps | copy sixteen bytes (four floats, to the compiler) from an address that is a multiple of sixteen |
vmovd | the AVX spelling of movd |
vmovq | the AVX spelling of movq |
vpmovmskb | the AVX spelling of pmovmskb |
vpxor | exclusive OR of the second and third operands, sixteen bytes at once, into the first |
vxorps | exclusive OR of sixteen bytes into the first operand; with one register three times, this clears it |
vpor | OR of the second and third operands, sixteen bytes at once, into the first |
vpand | AND of the second and third operands, sixteen bytes at once, into the first |
vpaddb | add the second and third operands lane by lane, sixteen bytes at once, into the first |
vpsubb | subtract the third operand from the second lane by lane, sixteen bytes at once, into the first |
vpcmpeqb | compare the second and third operands lane by lane, filling each lane of the first with ones where they matched |
vpinsrb | copy the second operand into the first with one byte lane (the last operand says which) replaced by the third |
vpinsrw | copy the second operand into the first with one word lane (the last operand says which) replaced by the third |
vpinsrd | copy the second operand into the first with one dword lane (the last operand says which) replaced by the third |
vpinsrq | copy the second operand into the first with one qword lane (the last operand says which) replaced by the third |
vpextrb | copy one byte lane (the last operand says which) of the second operand into the first |
vpextrw | copy one word lane (the last operand says which) of the second operand into the first |
vpextrd | copy one dword lane (the last operand says which) of the second operand into the first |
vpextrq | copy one qword lane (the last operand says which) of the second operand into the first |
vpminub | the smaller of each pair of bytes, unsigned |
vpmaxub | the larger of each pair of bytes, unsigned |
vpminud | the smaller of each pair of dwords, unsigned |
vpmaxud | the larger of each pair of dwords, unsigned |
vpcmpeqd | compare four pairs of dwords, filling each lane with ones where they matched |
vpcmpeqw | compare eight pairs of words, filling each lane with ones where they matched |
vpcmpeqq | compare two pairs of qwords, filling each lane with ones where they matched |
vpcmpgtb | compare sixteen pairs of signed bytes, filling each lane with ones where the first was greater |
vpcmpgtw | compare eight pairs of signed words, filling each lane with ones where the first was greater |
vpcmpgtd | compare four pairs of signed dwords, filling each lane with ones where the first was greater |
vpcmpgtq | compare two pairs of signed qwords, filling each lane with ones where the first was greater |
vpaddd | add four pairs of dwords |
vpsubd | subtract four pairs of dwords |
vpaddw | add eight pairs of words |
vpsubusb | subtract sixteen pairs of bytes, stopping at zero instead of wrapping |
vpandn | AND the third operand with the complement of the second, sixteen bytes at once |
vpsrld | shift each dword right by a constant |
vpslld | shift each dword left by a constant |
vpsrlw | shift each word right by a constant |
vpsllw | shift each word left by a constant |
vpsrlq | shift each qword right by a constant |
vpsllq | shift each qword left by a constant |
vpshufd | rearrange the four dwords of the second operand: each pair of bits of the constant picks the source dword for one lane |
vpshufb | rearrange the bytes of the second operand: each byte of the third names the source lane for that position, or clears it when its top bit is set |
vpbroadcastd | copy one dword into all four lanes |
vpbroadcastb | copy one byte into all sixteen lanes |
addsd | add two doubles, on the low double of an xmm register; its upper eight bytes stay as they were |
vaddsd | add two doubles, on the low double: the second operand's low double with the third's, the result in the first, whose upper eight bytes are copied from the second |
subsd | subtract the second double from the first, on the low double of an xmm register; its upper eight bytes stay as they were |
vsubsd | subtract the second double from the first, on the low double: the second operand's low double with the third's, the result in the first, whose upper eight bytes are copied from the second |
mulsd | multiply two doubles, on the low double of an xmm register; its upper eight bytes stay as they were |
vmulsd | multiply two doubles, on the low double: the second operand's low double with the third's, the result in the first, whose upper eight bytes are copied from the second |
divsd | divide the first double by the second (division by zero gives infinity, and 0/0 gives NaN, without stopping the run), on the low double of an xmm register; its upper eight bytes stay as they were |
vdivsd | divide the first double by the second (division by zero gives infinity, and 0/0 gives NaN, without stopping the run), on the low double: the second operand's low double with the third's, the result in the first, whose upper eight bytes are copied from the second |
sqrtsd | the square root of a double: the low double of the second operand, into the low double of the first; the first's upper eight bytes stay |
vsqrtsd | the square root of a double: the low double of the third operand, into the low double of the first; the first's upper eight bytes are copied from the second |
movsd | copy one double: from memory into the low eight bytes of an xmm register (clearing the rest), from a register to memory, or between registers (the destination keeps its upper eight bytes) |
vmovsd | copy one double: from memory into the low eight bytes of an xmm register (clearing the rest), from a register to memory, or, with three registers, the third one's double with the second one's upper eight bytes |
cvtsi2sd | convert a signed integer (in a register or memory) to a double in the low eight bytes of the first operand; its upper eight bytes stay |
vcvtsi2sd | convert a signed integer (in a register or memory) to a double in the low eight bytes of the first operand; its upper eight bytes are copied from the second |
ucomisd | compare the low doubles of two operands and report the answer in the flags: unordered (a NaN) sets ZF, PF and CF; greater clears all three; less sets CF; equal sets ZF; then use ja, jb, je, or jp to act on it |
vucomisd | compare the low doubles of two operands and report the answer in the flags: unordered (a NaN) sets ZF, PF and CF; greater clears all three; less sets CF; equal sets ZF; then use ja, jb, je, or jp to act on it |
comisd | compare the low doubles of two operands and report the answer in the flags: unordered (a NaN) sets ZF, PF and CF; greater clears all three; less sets CF; equal sets ZF; then use ja, jb, je, or jp to act on it |
vcomisd | compare the low doubles of two operands and report the answer in the flags: unordered (a NaN) sets ZF, PF and CF; greater clears all three; less sets CF; equal sets ZF; then use ja, jb, je, or jp to act on it |
shld | shift the first operand left by a count (a constant or cl), filling from the right with the top bits of the second operand, which does not change; CF takes the last bit pushed out. A count of zero changes nothing, flags included |
shrd | shift the first operand right by a count (a constant or cl), filling from the left with the bottom bits of the second operand, which does not change; CF takes the last bit pushed out. A count of zero changes nothing, flags included |
movabs | copy a full sixty-four-bit constant into a register |
je | jump when equal (ZF set) |
cmove | copy the second operand into the first when equal (ZF set), and do nothing otherwise |
sete | store 1 when equal (ZF set), otherwise store 0 |
jz | jump when zero (ZF set) |
cmovz | copy the second operand into the first when zero (ZF set), and do nothing otherwise |
setz | store 1 when zero (ZF set), otherwise store 0 |
jne | jump when not equal (ZF clear) |
cmovne | copy the second operand into the first when not equal (ZF clear), and do nothing otherwise |
setne | store 1 when not equal (ZF clear), otherwise store 0 |
jnz | jump when not zero (ZF clear) |
cmovnz | copy the second operand into the first when not zero (ZF clear), and do nothing otherwise |
setnz | store 1 when not zero (ZF clear), otherwise store 0 |
jb | jump when below, unsigned (CF set) |
cmovb | copy the second operand into the first when below, unsigned (CF set), and do nothing otherwise |
setb | store 1 when below, unsigned (CF set), otherwise store 0 |
jnae | jump when below, unsigned (CF set) |
cmovnae | copy the second operand into the first when below, unsigned (CF set), and do nothing otherwise |
setnae | store 1 when below, unsigned (CF set), otherwise store 0 |
jc | jump when carry set |
cmovc | copy the second operand into the first when carry set, and do nothing otherwise |
setc | store 1 when carry set, otherwise store 0 |
jae | jump when at or above, unsigned (CF clear) |
cmovae | copy the second operand into the first when at or above, unsigned (CF clear), and do nothing otherwise |
setae | store 1 when at or above, unsigned (CF clear), otherwise store 0 |
jnb | jump when at or above, unsigned (CF clear) |
cmovnb | copy the second operand into the first when at or above, unsigned (CF clear), and do nothing otherwise |
setnb | store 1 when at or above, unsigned (CF clear), otherwise store 0 |
jnc | jump when carry clear |
cmovnc | copy the second operand into the first when carry clear, and do nothing otherwise |
setnc | store 1 when carry clear, otherwise store 0 |
jbe | jump when below or equal, unsigned |
cmovbe | copy the second operand into the first when below or equal, unsigned, and do nothing otherwise |
setbe | store 1 when below or equal, unsigned, otherwise store 0 |
jna | jump when below or equal, unsigned |
cmovna | copy the second operand into the first when below or equal, unsigned, and do nothing otherwise |
setna | store 1 when below or equal, unsigned, otherwise store 0 |
ja | jump when above, unsigned |
cmova | copy the second operand into the first when above, unsigned, and do nothing otherwise |
seta | store 1 when above, unsigned, otherwise store 0 |
jnbe | jump when above, unsigned |
cmovnbe | copy the second operand into the first when above, unsigned, and do nothing otherwise |
setnbe | store 1 when above, unsigned, otherwise store 0 |
jl | jump when less, signed |
cmovl | copy the second operand into the first when less, signed, and do nothing otherwise |
setl | store 1 when less, signed, otherwise store 0 |
jnge | jump when less, signed |
cmovnge | copy the second operand into the first when less, signed, and do nothing otherwise |
setnge | store 1 when less, signed, otherwise store 0 |
jge | jump when greater or equal, signed |
cmovge | copy the second operand into the first when greater or equal, signed, and do nothing otherwise |
setge | store 1 when greater or equal, signed, otherwise store 0 |
jnl | jump when greater or equal, signed |
cmovnl | copy the second operand into the first when greater or equal, signed, and do nothing otherwise |
setnl | store 1 when greater or equal, signed, otherwise store 0 |
jle | jump when less or equal, signed |
cmovle | copy the second operand into the first when less or equal, signed, and do nothing otherwise |
setle | store 1 when less or equal, signed, otherwise store 0 |
jng | jump when less or equal, signed |
cmovng | copy the second operand into the first when less or equal, signed, and do nothing otherwise |
setng | store 1 when less or equal, signed, otherwise store 0 |
jg | jump when greater, signed |
cmovg | copy the second operand into the first when greater, signed, and do nothing otherwise |
setg | store 1 when greater, signed, otherwise store 0 |
jnle | jump when greater, signed |
cmovnle | copy the second operand into the first when greater, signed, and do nothing otherwise |
setnle | store 1 when greater, signed, otherwise store 0 |
js | jump when negative (SF set) |
cmovs | copy the second operand into the first when negative (SF set), and do nothing otherwise |
sets | store 1 when negative (SF set), otherwise store 0 |
jns | jump when not negative (SF clear) |
cmovns | copy the second operand into the first when not negative (SF clear), and do nothing otherwise |
setns | store 1 when not negative (SF clear), otherwise store 0 |
jo | jump when overflowed (OF set) |
cmovo | copy the second operand into the first when overflowed (OF set), and do nothing otherwise |
seto | store 1 when overflowed (OF set), otherwise store 0 |
jno | jump when did not overflow (OF clear) |
cmovno | copy the second operand into the first when did not overflow (OF clear), and do nothing otherwise |
setno | store 1 when did not overflow (OF clear), otherwise store 0 |
jp | jump when parity even (PF set); after a floating-point compare, unordered: one side was NaN |
cmovp | copy the second operand into the first when parity even (PF set); after a floating-point compare, unordered: one side was NaN, and do nothing otherwise |
setp | store 1 when parity even (PF set); after a floating-point compare, unordered: one side was NaN, otherwise store 0 |
jpe | jump when parity even (PF set); after a floating-point compare, unordered: one side was NaN |
cmovpe | copy the second operand into the first when parity even (PF set); after a floating-point compare, unordered: one side was NaN, and do nothing otherwise |
setpe | store 1 when parity even (PF set); after a floating-point compare, unordered: one side was NaN, otherwise store 0 |
jnp | jump when parity odd (PF clear); after a floating-point compare, ordered: neither side was NaN |
cmovnp | copy the second operand into the first when parity odd (PF clear); after a floating-point compare, ordered: neither side was NaN, and do nothing otherwise |
setnp | store 1 when parity odd (PF clear); after a floating-point compare, ordered: neither side was NaN, otherwise store 0 |
jpo | jump when parity odd (PF clear); after a floating-point compare, ordered: neither side was NaN |
cmovpo | copy the second operand into the first when parity odd (PF clear); after a floating-point compare, ordered: neither side was NaN, and do nothing otherwise |
setpo | store 1 when parity odd (PF clear); after a floating-point compare, ordered: neither side was NaN, otherwise store 0 |