x86 instruction listings

The x86 instruction set refers to the set of instructions that x86-compatible microprocessors support. The instructions are usually part of an executable program, often stored as a computer file and executed on the processor.

The x86 instruction set has been extended several times, introducing wider registers and datatypes as well as new functionality.[1]

x86 integer instructions

Below is the full 8086/8088 instruction set of Intel (81 instructions total). Most if not all of these instructions are available in 32-bit mode; they just operate on 32-bit registers (eax, ebx, etc.) and values instead of their 16-bit (ax, bx, etc.) counterparts. See also x86 assembly language for a quick tutorial for this processor family. The updated instruction set is also grouped according to architecture (i386, i486, i686) and more generally is referred to as (32-bit) x86 and (64-bit) x86-64 (also known as AMD64).

Original 8086/8088 instructions

Original 8086/8088 instruction set
InstructionMeaningNotesOpcode
AAAASCII adjust AL after additionused with unpacked binary-coded decimal0x37
AADASCII adjust AX before division8086/8088 datasheet documents only base 10 version of the AAD instruction (opcode 0xD5 0x0A), but any other base will work. Later Intel's documentation has the generic form too. NEC V20 and V30 (and possibly other NEC V-series CPUs) always use base 10, and ignore the argument, causing a number of incompatibilities0xD5
AAMASCII adjust AX after multiplicationOnly base 10 version (Operand is 0xA) is documented, see notes for AAD0xD4
AASASCII adjust AL after subtraction0x3F
ADCAdd with carrydestination = destination + source + carry_flag0x100x15, 0x800x81/2, 0x820x83/2 (since 80186)
ADDAdd(1) r/m += r/imm; (2) r += m/imm;0x000x05, 0x80/00x81/0, 0x82/00x83/0 (since 80186)
ANDLogical AND(1) r/m &= r/imm; (2) r &= m/imm;0x200x25, 0x800x81/4, 0x820x83/4 (since 80186)
CALLCall procedurepush eip; eip points to the instruction directly after the call0x9A, 0xE8, 0xFF/2, 0xFF/3
CBWConvert byte to word0x98
CLCClear carry flagCF = 0;0xF8
CLDClear direction flagDF = 0;0xFC
CLIClear interrupt flagIF = 0;0xFA
CMCComplement carry flag0xF5
CMPCompare operands0x380x3D, 0x800x81/7, 0x820x83/7 (since 80186)
CMPSBCompare bytes in memory0xA6
CMPSWCompare words0xA7
CWDConvert word to doubleword0x99
DAADecimal adjust AL after addition(used with packed binary-coded decimal)0x27
DASDecimal adjust AL after subtraction0x2F
DECDecrement by 10x480x4F, 0xFE/1, 0xFF/1
DIVUnsigned divide(1) AX = DX:AX / r/m; resulting DX = remainder (2) AL = AX / r/m; resulting AH = remainder0xF7/6, 0xF6/6
ESCUsed with floating-point unit0xD8..0xDF
HLTEnter halt state0xF4
IDIVSigned divide(1) AX = DX:AX / r/m; resulting DX = remainder (2) AL = AX / r/m; resulting AH = remainder0xF7/7, 0xF6/7
IMULSigned multiply in One-operand form(1) DX:AX = AX * r/m; (2) AX = AL * r/m0x69, 0x6B (both since 80186), 0xF7/5, 0xF6/5, 0x0FAF (since 80386)
INInput from port(1) AL = port[imm]; (2) AL = port[DX]; (3) AX = port[imm]; (4) AX = port[DX];0xE4, 0xE5, 0xEC, 0xED
INCIncrement by 10x400x47, 0xFE/0, 0xFF/0
INTCall to interrupt0xCC, 0xCD
INTOCall to interrupt if overflow0xCE
IRETReturn from interrupt0xCF
JccJump if condition(JA, JAE, JB, JBE, JC, JE, JG, JGE, JL, JLE, JNA, JNAE, JNB, JNBE, JNC, JNE, JNG, JNGE, JNL, JNLE, JNO, JNP, JNS, JNZ, JO, JP, JPE, JPO, JS, JZ)0x700x7F, 0x0F800x0F8F (since 80386)
JCXZJump if CX is zero0xE3
JMPJump0xE90xEB, 0xFF/4, 0xFF/5
LAHFLoad FLAGS into AH register0x9F
LDSLoad pointer using DS0xC5
LEALoad Effective Address0x8D
LESLoad ES with pointer0xC4
LOCKAssert BUS LOCK# signal(for multiprocessing)0xF0
LODSBLoad string byteif (DF==0) AL = *SI++; else AL = *SI--;0xAC
LODSWLoad string wordif (DF==0) AX = *SI++; else AX = *SI--;0xAD
LOOP/LOOPxLoop control(LOOPE, LOOPNE, LOOPNZ, LOOPZ) if (x && --CX) goto lbl;0xE00xE2
MOVMovecopies data from one location to another, (1) r/m = r; (2) r = r/m;0xA0...0xA3
MOVSBMove byte from string to string
if (DF==0) 
  *(byte*)DI++ = *(byte*)SI++; 
else 
  *(byte*)DI-- = *(byte*)SI--;
0xA4
MOVSWMove word from string to string
if (DF==0) 
  *(word*)DI++ = *(word*)SI++; 
else 
  *(word*)DI-- = *(word*)SI--;
0xA5
MULUnsigned multiply(1) DX:AX = AX * r/m; (2) AX = AL * r/m;0xF7/4, 0xF6/4
NEGTwo's complement negationr/m *= -1;0xF6/30xF7/3
NOPNo operationopcode equivalent to XCHG EAX, EAX0x90
NOTNegate the operand, logical NOTr/m ^= -1;0xF6/20xF7/2
ORLogical OR(1) r/m |= r/imm; (2) r |= m/imm;0x080x0D, 0x800x81/1, 0x820x83/1 (since 80186)
OUTOutput to port(1) port[imm] = AL; (2) port[DX] = AL; (3) port[imm] = AX; (4) port[DX] = AX;0xE6, 0xE7, 0xEE, 0xEF
POPPop data from stackr/m = *SP++; POP CS (opcode 0x0F) works only on 8086/8088. Later CPUs use 0x0F as a prefix for newer instructions.0x07, 0x0F(8086/8088 only), 0x17, 0x1F, 0x580x5F, 0x8F/0
POPFPop FLAGS register from stackFLAGS = *SP++;0x9D
PUSHPush data onto stack*--SP = r/m;0x06, 0x0E, 0x16, 0x1E, 0x500x57, 0x68, 0x6A (both since 80186), 0xFF/6
PUSHFPush FLAGS onto stack*--SP = FLAGS;0x9C
RCLRotate left (with carry)0xC00xC1/2 (since 80186), 0xD00xD3/2
RCRRotate right (with carry)0xC00xC1/3 (since 80186), 0xD00xD3/3
REPxxRepeat MOVS/STOS/CMPS/LODS/SCAS(REP, REPE, REPNE, REPNZ, REPZ)0xF2, 0xF3
RETReturn from procedureNot a real instruction. The assembler will translate these to a RETN or a RETF depending on the memory model of the target system.
RETNReturn from near procedure0xC2, 0xC3
RETFReturn from far procedure0xCA, 0xCB
ROLRotate left0xC00xC1/0 (since 80186), 0xD00xD3/0
RORRotate right0xC00xC1/1 (since 80186), 0xD00xD3/1
SAHFStore AH into FLAGS0x9E
SALShift Arithmetically left (signed shift left)(1) r/m <<= 1; (2) r/m <<= CL;0xC00xC1/4 (since 80186), 0xD00xD3/4
SARShift Arithmetically right (signed shift right)(1) (signed) r/m >>= 1; (2) (signed) r/m >>= CL;0xC00xC1/7 (since 80186), 0xD00xD3/7
SBBSubtraction with borrowalternative 1-byte encoding of SBB AL, AL is available via undocumented SALC instruction0x180x1D, 0x800x81/3, 0x820x83/3 (since 80186)
SCASBCompare byte string0xAE
SCASWCompare word string0xAF
SHLShift left (unsigned shift left)0xC00xC1/4 (since 80186), 0xD00xD3/4
SHRShift right (unsigned shift right)0xC00xC1/5 (since 80186), 0xD00xD3/5
STCSet carry flagCF = 1;0xF9
STDSet direction flagDF = 1;0xFD
STISet interrupt flagIF = 1;0xFB
STOSBStore byte in stringif (DF==0) *ES:DI++ = AL; else *ES:DI-- = AL;0xAA
STOSWStore word in stringif (DF==0) *ES:DI++ = AX; else *ES:DI-- = AX;0xAB
SUBSubtraction(1) r/m -= r/imm; (2) r -= m/imm;0x280x2D, 0x800x81/5, 0x820x83/5 (since 80186)
TESTLogical compare (AND)(1) r/m & r/imm; (2) r & m/imm;0x84, 0x84, 0xA8, 0xA9, 0xF6/0, 0xF7/0
WAITWait until not busyWaits until BUSY# pin is inactive (used with floating-point unit)0x9B
XCHGExchange datar :=: r/m; A spinlock typically uses xchg as an atomic operation. (coma bug).0x86, 0x87, 0x910x97
XLATTable look-up translationbehaves like MOV AL, [BX+AL]0xD7
XORExclusive OR(1) r/m ^= r/imm; (2) r ^= m/imm;0x300x35, 0x800x81/6, 0x820x83/6 (since 80186)

Added with 80186/80188

InstructionOpcodeMeaningNotes
BOUND62 /rCheck array index against boundsraises software interrupt 5 if test fails
ENTERC8 iw ibEnter stack frameModifies stack for entry to procedure for high level language. Takes two operands: the amount of storage to be allocated on the stack and the nesting level of the procedure.
INSB/INSW 6C Input from port to string equivalent to:
IN AX, DX
MOV ES:[DI], AX
; adjust DI according to operand size and DF
6D
LEAVEC9Leave stack frameReleases the local stack storage created by the previous ENTER instruction.
OUTSB/OUTSW 6E Output string to port equivalent to:
MOV AX, DS:[SI]
OUT DX, AX
; adjust SI according to operand size and DF
6F
POPA61Pop all general purpose registers from stackequivalent to:
POP DI
POP SI
POP BP
POP AX ; no POP SP here, all it does is ADD SP, 2 (since AX will be overwritten later)
POP BX
POP DX
POP CX
POP AX
PUSHA60Push all general purpose registers onto stackequivalent to:
PUSH AX
PUSH CX
PUSH DX
PUSH BX
PUSH SP ; The value stored is the initial SP value
PUSH BP
PUSH SI
PUSH DI
PUSH immediate 6A ib Push an immediate byte/word value onto the stack example:
PUSH 12h
PUSH 1200h
68 iw
IMUL immediate 6B /r ib Signed and unsigned multiplication of immediate byte/word value example:
IMUL BX,12h
IMUL DX,1200h
IMUL CX, DX, 12h
IMUL BX, SI, 1200h
IMUL DI, word ptr [BX+SI], 12h
IMUL SI, word ptr [BP-4], 1200h

Note that since the lower half is the same for unsigned and signed multiplication, this version of the instruction can be used for unsigned multiplication as well.

69 /r iw
SHL/SHR/SAL/SAR/ROL/ROR/RCL/RCR immediate C0 Rotate/shift bits with an immediate value greater than 1 example:
ROL AX,3
SHR BL,3
C1

Added with NEC V-series

These instructions are specific to the NEC V20/V30 CPUs and their successors, and do not appear in any non-NEC CPUs. Many of their opcodes have been reassigned to other instructions in later non-NEC CPUs.

Opcode Instruction Description Available on
0F 10 /0 TEST1 r/m8, CL Test one bit.

First argument specifies an 8/16-bit register or memory location.

Second argument specifies which bit to test.

All V-series[2] except V30MZ[3]
0F 11 /0 TEST1 r/m16, CL
0F 18 /0 ib  TEST1 r/m8, imm8
0F 19 /0 ib TEST1 r/m16, imm8
0F 12 /0 CLR1 r/m8, CL Clear one bit.
0F 13 /0 CLR1 r/m16, CL
0F 1A /0 ib CLR1 r/m8, imm8
0F 1B /0 ib CLR1 r/m16, imm8
0F 14 /0 SET1 r/m8, CL Set one bit.
0F 15 /0 SET1 r/m16, CL
0F 1C /0 ib SET1 r/m8, imm8
0F 1D /0 ib SET1 r/m16, imm8
0F 16 /0 NOT1 r/m8, CL Invert one bit.
0F 17 /0 NOT1 r/m16, CL
0F 1E /0 ib NOT1 r/m8, imm8
0F 1F /0 ib NOT1 r/m16, imm8
0F 20 ADD4S Add Nibble Strings.

Performs a string addition of integers in packed BCD format (2 BCD digits per byte). DS:SI points to a source integer, ES:DI to a destination integer, and CL provides the number of digits to add. The operation is then: destination <- destination + source

0F 22 SUB4S Subtract Nibble Strings.

destination <- destination - source

0F 26 CMP4S Compare Nibble Strings.
0F 28 /0 ROL4 r/m8 Rotate Left Nibble.

Concatenates its 8-bit argument with the bottom 4 bits of AL to form a 12-bit bitvector, then left-rotates this bitvector by 4 bits, then writes this bitvector back to its argument and the bottom 4 bits of AL.

0F 2A /0 ROR4 r/m8 Rotate Right Nibble. Similar to ROL4, except performs a right-rotate by 4 bits.
0F 30 /r EXT r8,r8 Bitfield extract.

Perform a bitfield read from memory. DS:SI (DS0:IX in NEC nomenclature) points to memory location to read from, first argument specifies bit-offset to read from, and second argument specifies the number of bits to read minus 1. The result is placed in AX. After the bitfield read, SI and the first argument are updated to point just beyond the just-read bitfield.

0F 38 /0 ib EXT r8,imm8
0F 31 /r INS r8,r8 Bitfield Insert.

Perform a bitfield write to memory. ES:DI (DS1:IY in NEC nomenclature) points to memory location to write to, AX contains data to write, first argument specifies bit-offset to write to, and second argument specifies the number of bits to write minus 1. After the bitfield write, DI and the first argument are updated to point just beyond the just-written bitfield.

0F 39 /0 ib INS r8,imm8
64 REPC Repeat if carry. Instruction prefix for use with CMPS/SCAS.
65 REPNC Repeat if not carry. Instruction prefix for use with CMPS/SCAS.
66 /r

67 /r

FPO2 "Floating Point Operation 2": extra escape opcodes for floating-point coprocessor, in addition to the standard D8-DF ones used for x87.

Used by the NEC 72291 floating-point coprocessor. A listing of the opcodes/instructions supported by the 72291 is available.[4]

0F FF ib BRKEM imm8 Break to 8080 emulation mode.

Jump to an address picked from the Interrupt Vector Table using the imm8 argument, similar to the INT instruction, but start executing as Intel 8080 code rather than x86 code.

V20, V30, V40, V50[2]
0F E0 ib BRKXA imm8 Break to Extended Address Mode.

Jump to an address picked from the Interrupt Vector Table using the imm8 argument. Enables a simple memory paging mechanism after reading the IVT but before executing the jump. The paging mechanism uses an on-chip page table with 16Kbyte pages and no access rights checking.[5]

V33, V53[2]
0F F0 ib RETXA imm8 Return from Extended Address Mode.

Jump to an address picked from the Interrupt Vector Table using the imm8 argument. Disables paging after reading the IVT but before executing the jump.

0F 25 MOVSPA Transfer both SS and SP of old register bank after the bank has been switched by an interrupt or BRKCS instruction. V25, V35,[6] V55[7]
0F 2D /0 BRKCS r16 Perform software interrupt with context switch to register bank specified by low 3 bits of r16.
0F 91 RETRBI Return from register bank context switch interrupt.
0F 92 FINT Finish Interrupt.
0F 94 /7 TSKSW r16 Perform task switch to register bank indicated by low 3 bits of r16.
0F 95 /7 MOVSPB r16 Transfer SS and SP of current register bank to register bank indicated by low 3 bits of r16.
0F 9C ib ib rel8 BTCLR imm8,imm8,cb Bit Test and Clear.

The first argument specifies a V25/V35 Special Function Register to test a bit in. The second argument specifies a bit position in that register. The third argument specifies a short branch offset. If the bit was set to 1, then it is cleared and a short branch is taken, else the branch is not taken.

0F 9E STOP CPU Halt. Differs from conventional 8086 HLT in that the clock is stopped too, so that an NMI or CPU reset is needed to resume operation.
F1 ib BRKS imm8 Break and Enable Software Guard.

Jump to an address picked from the Interrupt Vector Table using the imm8 argument, and then continue execution with "Software Guard" enabled. The "Software Guard" is an 8-bit Substitution cipher that, during instruction fetch/decode, translates opcode bytes using a 256-entry lookup table stored in an on-chip Mask ROM.

V25, V35 "Software Guard"[8]
63 ib BRKN imm8 Break and Enable Native Mode. Similar to BRKS, excepts disables "Software Guard" rather than enabling it.
8C /6 MOV r/m,DS3 Move to/from DS2 and DS3 extended segment registers. These registers, specific to V55, act similar to regular x86 real-mode segment registers except that they are left-shifted by 8 rather than 4, enabling access to 16MB of memory. V55[7]
8C /7 MOV r/m,DS2
8E /6 MOV DS3,r/m
8E /7 MOV DS2,r/m
0F 76[9] PUSH DS3
0F 77 POP DS3
0F 7E PUSH DS2
0F 7F POP DS2
0F 36 /r MOV DS3,r16,m32 Instructions to load both extended segment register and general-purpose register at once, similar to 8086's LDS and LES instructions
0F 3E /r MOV DS2,r16,m32
63 DS2: Segment prefixes for the DS2 and DS3 extended segments
D6 DS3:
F1 IRAM: Register File Override Prefix. Will cause memory operands to index into register file rather than general memory
0F 3C /0 BSCH r/m8 Count Trailing Zeroes and store result in CL. Sets ZF=1 for all-0s input.
0F 3D /0 BSCH r/m16
0F 96 ib ib RSTWDT imm8,imm8 Watchdog Timer Manipulation Instruction
0F 9D ib ib rel8 BTCLRL imm8,imm8,cb Bit test and clear for second bank of special purpose registers (similar to BTCLR)
0F E0 iw QHOUT imm16 Queue manipulation instructions
0F E1 iw QOUT imm16
0F E2 iw QTIN imm16
0F 9F IDLE Put CPU in idle mode V55SC[10]
0F 9A ALBIT Dedicated fax instructions V55PI[7]
0F 9B COLTRP
0F 93 MHENC
0F 97 MRENC
0F 78 SCHEOL
0F 79 GETBIT
0F 7C MHDEC
0F 7D MRDEC
0F 7A CNVTRP
63 (no mnemonic) Designated opcode for termination of the x86 emulation mode on the NEC V60.[11] V60

Added with 80286

InstructionOpcodeMeaningNotes
ARPL r/m16, r16 63 /r Adjust RPL field of selector Available in 16/32-bit protected mode only.

Causes #UD in Real mode and Virtual 8086 Mode - Windows 95 and OS/2 2.x are known to make extensive use of this #UD to use the 63 opcode as a one-byte breakpoint to transition from Virtual 8086 Mode to kernel mode.[12][13]

CLTS 0F 06 Clear task-switched flag in Machine Status Word.
LAR r,r/m16 0F 02 /r Load access rights byte from the specified segment descriptor Sets ZF=1 if the descriptor could be loaded, ZF=0 otherwise.

32-bit variant of LAR instruction is documented to load undefined data into bits 19:16 of destination register on Intel CPUs.

LSL r,r/m16 0F 03 /r Load segment limit from the specified segment descriptor Sets ZF=1 if the descriptor could be loaded, ZF=0 otherwise.
LGDT m16&32 0F 01 /2 Load Global Descriptor Table Register Each of these instructions loads a 2-part table descriptor. The first part is a 16-bit value, specifying table size in bytes minus 1. The second part is a 32-bit value (64-bit value in 64-bit mode), specifying the linear start address for the table. This address is ANDed with 00FFFFFFh for the 16-bit variants of these instructions.

LIDT can relocate the Interrupt Vector Table in Real Mode as well.

LGDT and LIDT are serializing instructions.

LIDT m16&32 0F 01 /3 Load Interrupt Descriptor Table Register
LLDT r/m16 0F 00 /2 Load Local Descriptor Table Register LLDT and LTR are serializing instructions.
LTR r/m16 0F 00 /3 Load Task Register
LMSW r/m16 0F 01 /6 Load Machine Status Word On 80386 and later, the "Machine Status Word" is the same as the CR0 register, however LMSW can only modify the bottom 4 bits of this register.

LMSW can be used to enter but not leave x86 Protected Mode. On the 80286, it is not possible to leave Protected Mode at all without a CPU reset - on 80386 and later, it is possible to leave Protected Mode, but this requires the use of the 80386-and-later MOV to CR0 instruction.

LMSW is a serializing instruction.

SGDT m16&32 0F 01 /0 Store Global Descriptor Table Register The SGDT,SIDT,SLDT,SMSW,STR were unprivileged on all x86 CPUs from 80286 onwards until the introduction of UMIP in 2017.[14]

This has been a significant security problem for software-based virtualization, since it enables these instructions to be used by a VM guest to detect that it is running inside a VM.[15][16]

The 16-bit variants of the SGDT and SIDT instructions also show a difference between Intel documentation and actual behavior observed on Intel CPUs: as of Intel SDM revision 076, december 2021, the last 8 bits of the descriptor is documented as being written as 0, however observed behavior is that bits 31:24 of the descriptor table address are written instead.[17]

SLDT and SMSW (but not STR) with a 32-bit register argument are documented to set the top 16 bits of the specified register to an undefined value on Intel CPUs.

SIDT m16&32 0F 01 /1 Store Interrupt Descriptor Table Register
SLDT r/m16 0F 00 /0 Store Local Descriptor Table Register
SMSW r/m16 0F 01 /4 Store Machine Status Word
STR r/m16 0F 00 /1 Store Task Register
VERR r/m16 0F 00 /4 Verify a segment for reading Sets ZF=1 if segment can be read, ZF=0 otherwise.
VERW r/m16 0F 00 /5 Verify a segment for writing Sets ZF=1 if segment can be written, ZF=0 otherwise.

On some Intel CPU/microcode combinations from 2019 onwards, the VERW instruction also flushes microarchitectural data buffers. This enables it to be used as part of workarounds for Microarchitectural Data Sampling security vulnerabilities.[18][19]

LOADALL 0F 05 Load all CPU registers, including internal ones such as GDT Undocumented, 80286 only. (A different variant of LOADALL with a different opcode and memory layout exists on 80386.)

Added with 80386

InstructionMeaningNotes
BSFBit scan forwardBSF and BSR produce undefined results if the source argument is all-0s.
BSRBit scan reverse
BTBit test
BTCBit test and complementInstructions atomic only if LOCK prefix present.
BTRBit test and reset
BTSBit test and set
CDQConvert double-word to quad-wordSign-extends EAX into EDX, forming the quad-word EDX:EAX. Since (I)DIV uses EDX:EAX as its input, CDQ must be called after setting EAX if EDX is not manually initialized (as in 64/32 division) before (I)DIV.
CMPSDCompare string double-wordCompares ES:[(E)DI] with DS:[(E)SI] and increments or decrements both (E)DI and (E)SI, depending on DF; can be prefixed with REP
CWDEConvert word to double-wordUnlike CWD, CWDE sign-extends AX to EAX instead of AX to DX:AX
IBTSInsert Bit StringDiscontinued with B1 step of 80386.
IMULTwo-operand form of IMUL: Signed and UnsignedAllows to multiply two registers directly, storing the partial (truncated) lower bit result. Since the lower half is the same for unsigned and signed multiplication, this version of the instruction can be used for unsigned multiplication as well
INSDInput from port to string double-word*(long)ES:EDI±± = port[DX]; (±± depends on DF, ES: cannot be overridden). Can be prefixed with REP.
IRETxInterrupt return; D suffix means 32-bit return, F suffix means do not generate epilogue code (i.e. LEAVE instruction)Use IRETD rather than IRET in 32-bit situations
Jxx (near)Jump conditionallyConditional near jump instructions for all 8086 Jxx short jump instructions
JECXZJump if ECX is zero
LFS, LGSLoad far pointer
LSSLoad stack segment and registerNormally used to update both SS and SP at the same time.
LODSDLoad string double-wordEAX = *DS:(E)SI±±; (±± depends on DF, DS: can be overridden); can be prefixed with REP
LOOPW, LOOPccWLoop, conditional loopSame as LOOP, LOOPcc for earlier processors
LOOPD, LOOPccDLoop while equalif (cc && --ECX) goto lbl;, cc = Z(ero), E(qual), NonZero, N(on)E(qual)
MOV to/from CR/DR/TRMove to/from special registersCR=control registers, DR=debug registers, TR=test registers (up to 80486)
MOVSDMove string double-word*(dword*)ES:EDI±± = *(dword*)ESI±±; (±± depends on DF); can be prefixed with REP
MOVSXMove with sign-extension(long)r = (signed char) r/m; and similar
MOVZXMove with zero-extension(long)r = (unsigned char) r/m; and similar
OUTSDOutput to port from string double-wordport[DX] = *(long*)DS:ESI±±; (±± depends on DF, DS: can be overridden); can be prefixed with REP.
POPADPop all double-word (32-bit) registers from stackDoes not pop register ESP off of stack
POPFDPop data into EFLAGS register
PUSHADPush all double-word (32-bit) registers onto stack
PUSHFDPush EFLAGS register onto stack
PUSHDPush a double-word (32-bit) value onto stack
SCASDScan string data double-wordCompares ES:[(E)DI] with EAX and increments or decrements (E)DI, depending on DF; can be prefixed with REP
SETccSet byte to one on condition, zero otherwise(SETA, SETAE, SETB, SETBE, SETC, SETE, SETG, SETGE, SETL, SETLE, SETNA, SETNAE, SETNB, SETNBE, SETNC, SETNE, SETNG, SETNGE, SETNL, SETNLE, SETNO, SETNP, SETNS, SETNZ, SETO, SETP, SETPE, SETPO, SETS, SETZ)
SHLDShift left doubler1 = r1<<CL r2>>(register_width - CL); Instead of CL, 8-bit immediate can be used.
SHRDShift right doubler1 = r1>>CL r2<<(register_width - CL); Instead of CL, 8-bit immediate can be used.

SHLD and SHRD with 16-bit arguments and a shift-amount greater than 16 produce undefined results. (Actual results differ between different Intel CPUs, with at least three different behaviors known.[20])

STOSDStore string double-word*ES:EDI±± = EAX; (±± depends on DF, ES cannot be overridden); can be prefixed with REP
XBTSExtract Bit StringDiscontinued with B1 step of 80386.

Used by software mainly for detection of the buggy[21] B0 stepping of the 80386. Microsoft Windows (v2.01 and later) will attempt to run the XBTS instruction as part of its CPU detection if CPUID is not present, and will refuse to boot if XBTS is found to be working.[22]

Compared to earlier sets, the 80386 instruction set also adds opcodes with different parameter combinations for the following instructions: BOUND, IMUL, LDS, LES, MOV, POP, PUSH and prefix opcodes for FS and GS segment overrides.

Added with 80486

InstructionOpcodeMeaningNotes
BSWAP r32 0F C8+r Byte Swapr = r<<24 | r<<8&0x00FF0000 | r>>8&0x0000FF00 | r>>24; Only defined for 32-bit registers. Usually used to change between little endian and big endian representations. When used with 16-bit registers produces various different results on 486,[23] 586, and Bochs/QEMU.[24]
CMPXCHG r/m8, r8 0F A6 /r[25] Compare and Exchange 0F A6/A7 encodings only available on 80486 stepping A.[26]

0F B0/B1 encodings available on 80486 stepping B and later x86 CPUs.

Instruction atomic only if used with LOCK prefix.

0F B0 /r[27]
CMPXCHG r/m, r16/32 0F A7 /r
0F B1 /r
INVD 0F 08 Invalidate Internal Caches Flush internal caches. Modified data present in the cache are not written back to memory, potentially causing data loss.
INVLPG m8 0F 01 /7 Invalidate TLB Entry Invalidate TLB Entry for page that contains data specified.
WBINVD 0F 09 Write Back and Invalidate Cache Writes back all modified cache lines in the processor's internal cache to main memory and invalidates the internal caches.
XADD r/m,r8 0F C0 /r eXchange and ADD Exchanges the first operand with the second operand, then loads the sum of the two values into the destination operand.

Instruction atomic only if used with LOCK prefix.

XADD r/m,r16/32 0F C1 /r

Added with Pentium

InstructionOpcodeMeaningNotes
CPUID0F A2CPU IDentificationReturns data regarding processor identification and features, and returns data to the EAX, EBX, ECX, and EDX registers. Instruction functions specified by the EAX register.[1] This was also added to later 80486 processors
CMPXCHG8B m64 0F C7 /1 CoMPare and eXCHanGe 8 bytes Compare EDX:EAX with m64. If equal, set ZF and load ECX:EBX into m64. Else, clear ZF and load m64 into EDX:EAX.

Instruction atomic only if used with LOCK prefix.

LOCK CMPXCHG8B with a register operand (which is an invalid encoding) can cause hangs on some Intel Pentium CPUs (Pentium F00F bug).

RDMSR0F 32ReaD from Model-specific registerLoad MSR specified by ECX into EDX:EAX
RDTSC0F 31ReaD Time Stamp CounterReturns the number of processor ticks since the processor being "ONLINE" (since the last power on of system)
WRMSR0F 30WRite to Model-Specific RegisterWrite the value in EDX:EAX to MSR specified by ECX
RSM[28] 0F AAResume from System Management Mode This was introduced by the i386SL and later and is also in the i486SL and later, as well as Cyrix 486SLC/e[29] and later. Resumes from System Management Mode (SMM)

Added with Pentium MMX

InstructionOpcodeMeaningNotes
RDPMC0F 33Read the PMC [Performance Monitoring Counter]Specified in the ECX register into registers EDX:EAX

Also MMX registers and MMX support instructions were added. They are usable for both integer and floating point operations, see below.

Added with AMD K6

InstructionOpcodeMeaningNotes
SYSCALL0F 05Fast System Callfunctionally equivalent to SYSENTER
SYSRET0F 07Fast System Returnfunctionally equivalent to SYSEXIT

AMD changed the CPUID detection bit for this feature from the K6-II on.

Added with Pentium Pro

InstructionOpcodeMeaningNotes
CMOVcc r16,r/m

CMOVcc r32,r/m

0F 4x /r Conditional move (CMOVA, CMOVAE, CMOVB, CMOVBE, CMOVC, CMOVE, CMOVG, CMOVGE, CMOVL, CMOVLE, CMOVNA, CMOVNAE, CMOVNB, CMOVNBE, CMOVNC, CMOVNE, CMOVNG, CMOVNGE, CMOVNL, CMOVNLE, CMOVNO, CMOVNP, CMOVNS, CMOVNZ, CMOVO, CMOVP, CMOVPE, CMOVPO, CMOVS, CMOVZ)
UD2 0F 0B Undefined Instruction Generates an invalid opcode exception. This instruction is provided for software testing to explicitly generate an invalid opcode. The opcode for this instruction is reserved for this purpose.
NOP r/m  0F 1F /0 Official long NOP Introduced in the Pentium Pro, but undocumented until 2006.[30]

The whole 0F 18..1F opcode range was NOP in Pentium Pro. However, except for 0F 1F /0, Intel does not guarantee that these opcodes will remain NOP in future processors, and have indeed assigned some of these opcodes to other instructions in at least some processors.[31]

Added with Pentium II

InstructionOpcodeMeaningNotes
SYSENTER0F 34 SYStem call ENTER Sometimes called the Fast System Call instruction, this instruction was intended to increase the performance of operating system calls.

On the Pentium Pro, the CPUID instruction reports these instructions as available. This is considered incorrect, as the instructions are not officially supported on the Pentium Pro. (Third party testing indicates that the instructions are present but too defective to be usable on the Pentium Pro.[32])

SYSEXIT0F 35SYStem call EXIT

Added with Intel Itanium

These instructions are only present in the x86 operation mode of early Intel Itanium processors with hardware support for x86. This support was added in "Merced" and removed in "Montecito", replaced with software emulation.

Instruction Opcode Meaning
JMPE r/m16/32 0F 00 /6 Jump To Intel Itanium Instruction Set.[33]
JMPE disp16/32 0F B8 rel16/32

Added with Cyrix and Geode CPUs

These instructions are present in Cyrix CPUs as well as NatSemi/AMD Geode CPUs derived from Cyrix microarchitectures (Geode GX and LX, but not NX). They are also present in Cyrix manufacturing partner CPUs from IBM, ST and TI, as well as a few SoCs such as STPC ATLAS and ZFMicro ZFx86.[34] Many of these opcodes have been reassigned to other instructions in later non-Cyrix CPUs.

Opcode Instruction Description Available on
0F 78 /r SVDC m80,sreg Save segment register and descriptor to memory as a 10-byte data structure.

The first 8 bytes are the descriptor, the last two bytes are the selector.[35]

System Management Mode instructions.

Not present on stepping A of Cx486SLC and Cx486DLC.[36]

Present on Cx486SLC/e[29] and all later Cyrix CPUs.

Present on all Cyrix-derived Geode CPUs.

0F 79 /r RSDC sreg,m80 Restore segment register and descriptor from memory
0F 7A /0 SVLDT m80 Save LDTR and descriptor
0F 7B /0 RSLDT m80 Restore LDTR and descriptor
0F 7C /0 SVTS m80 Save TSR and descriptor
0F 7D /0 RSTS m80 Restore TSR and descriptor
0F 7E SMINT System management software interrupt.

Uses 0F 7E encoding on Cyrix 486, 5x86, 6x86 and ZFx86.

Uses 0F 38 encoding on Cyrix 6x86MX, MII, MediaGX and Geode.

0F 38
0F 36 /0 RDSHR r/m32 Read SMM Header Pointer Register Cyrix 6x86MX[37] and MII
0F 37 /0 WRSHR r/m32 Write SMM Header Pointer Register
0F 3A BB0_RESET Reset BLT Buffer Pointer 0 to base Cyrix MediaGX and MediaGXm[38]

NatSemi Geode GXm, GXLV, GX1

0F 3B BB1_RESET Reset BLT Buffer Pointer 1 to base
0F 3C CPU_WRITE Write to CPU internal special register (EBX=register-index, EAX=data)
0F 3D CPU_READ Read from CPU internal special register (EBX=register-index, EAX=data)
0F 39 DMINT Debug Management Mode Interrupt NatSemi Geode GX2

AMD Geode GX, LX[39]

0F 3A RDM Return from Debug Management Mode

Added with ALi/DM&P M6117 MCUs

The M6117 series of embedded microcontrollers feature a 386SX-class CPU core with a few M6117-specific additions to the Intel 386 instruction set. The ones documented for DM&P M1167D are:[40]

OpcodeInstructionDescription
F1BRKPMSystem management interrupt - enters "hyper state mode"
D6 E6RETPMReturn from "hyper state mode"
D6 CA 03 A0LDUSR UGRS,EAXSet page address of SMI entry point
D6 C8 03 A0(mnemonic not listed)Read page address of SMI entry point
D6 FA 03 02MOV PWRCR,EAXWrite to power control register
Added with SSE
InstructionOpcodeMeaningNotes
PREFETCHT00F 18 /1Prefetch Data from AddressPrefetch into all cache levels
PREFETCHT10F 18 /2Prefetch Data from AddressPrefetch into all cache levels EXCEPT[41][42] L1
PREFETCHT20F 18 /3Prefetch Data from AddressPrefetch into all cache levels EXCEPT L1 and L2
PREFETCHNTA0F 18 /0Prefetch Data from AddressPrefetch to non-temporal cache structure, minimizing cache pollution.
SFENCE0F AE F8Store FenceProcessor hint to make sure all store operations that took place prior to the SFENCE call are globally visible
Added with SSE2
InstructionOpcodeMeaningNotes
CLFLUSH m80F AE /7Cache Line FlushInvalidates the cache line that contains the linear address specified with the source operand from all levels of the processor cache hierarchy
LFENCE0F AE E8Load FenceSerializes load operations.
MFENCE0F AE F0Memory FencePerforms a serializing operation on all load and store instructions that were issued prior the MFENCE instruction.
MOVNTI m32, r320F C3 /rMove Doubleword Non-TemporalMove doubleword from r32 to m32, minimizing pollution in the cache hierarchy.
PAUSEF3 90Hint To Suspend ExecutionProvides a hint to the processor that the following code is a spin loop. Suspends execution of the thread for a number of cycles to free resources for the sibling SMT thread to proceed.
Added with SSE3
InstructionOpcodeMeaningNotes
MONITOR EAX, ECX, EDX0F 01 C8Setup Monitor AddressSets up a linear address range to be monitored by hardware and activates the monitor.
MWAIT EAX, ECX0F 01 C9Monitor WaitProcessor hint to stop instruction execution and enter an implementation-dependent optimized state until occurrence of a class of events.
Added with SSE4.2
InstructionOpcodeMeaningNotes
CRC32 r32, r/m8F2 0F 38 F0 /rAccumulate CRC32Computes CRC value using the CRC-32C (Castagnoli) polynomial 0x11EDC6F41 (normal form 0x1EDC6F41). This is the polynomial used in iSCSI. In contrast to the more popular one used in Ethernet, its parity is even, and it can thus detect any error with an odd number of changed bits.
CRC32 r32, r/m8F2 REX 0F 38 F0 /r
CRC32 r32, r/m16F2 0F 38 F1 /r
CRC32 r32, r/m32F2 0F 38 F1 /r
CRC32 r64, r/m8F2 REX.W 0F 38 F0 /r
CRC32 r64, r/m64F2 REX.W 0F 38 F1 /r
CRC32 r32, r/m8F2 0F 38 F0 /r

Added with x86-64

InstructionMeaningNotes
CDQESign extend EAX into RAX
CQOSign extend RAX into RDX:RAX
CMPSQCoMPare String Quadword
CMPXCHG16BCoMPare and eXCHanGe 16 Bytes
IRETQ64-bit Return from Interrupt
JRCXZJump if RCX is zero
LODSQLoaD String Quadword
MOVSXDMOV with Sign Extend 32-bit to 64-bit
POPFQPOP RFLAGS Register
PUSHFQPUSH RFLAGS Register
RDTSCPReaD Time Stamp Counter and Processor ID
SCASQSCAn String Quadword
STOSQSTOre String Quadword
SWAPGSExchange GS base with KernelGSBase MSR

Bit manipulation extensions

Added with ABM

LZCNT, POPCNT (POPulation CouNT) – advanced bit manipulation

Added with BMI1

ANDN, BEXTR, BLSI, BLSMSK, BLSR, TZCNT

Added with BMI2

BZHI, MULX, PDEP, PEXT, RORX, SARX, SHRX, SHLX

Added with TBM

AMD introduced TBM together with BMI1 in its Piledriver[43] line of processors; later AMD Jaguar and Zen-based processors do not support TBM.[44] No Intel processors (as of 2020) support TBM.

Instruction Description[45] Equivalent C expression[46]
BEXTR Bit field extract (with immediate) (src >> start) & ((1 << len) - 1)
BLCFILL Fill from lowest clear bit x & (x + 1)
BLCI Isolate lowest clear bit x | ~(x + 1)
BLCIC Isolate lowest clear bit and complement ~x & (x + 1)
BLCMSK Mask from lowest clear bit x ^ (x + 1)
BLCS Set lowest clear bit x | (x + 1)
BLSFILL Fill from lowest set bit x | (x - 1)
BLSIC Isolate lowest set bit and complement ~x | (x - 1)
T1MSKC Inverse mask from trailing ones ~x | (x + 1)
TZMSK Mask from trailing zeros ~x & (x - 1)

Added with CLMUL instruction set

InstructionOpcodeDescription
PCLMULQDQ xmmreg,xmmrm,imm66 0f 3a 44 /r ib Perform a carry-less multiplication of two 64-bit polynomials over the finite field GF(2k).
PCLMULLQLQDQ xmmreg,xmmrm66 0f 3a 44 /r 00 Multiply the low halves of the two registers.
PCLMULHQLQDQ xmmreg,xmmrm66 0f 3a 44 /r 01 Multiply the high half of the destination register by the low half of the source register.
PCLMULLQHQDQ xmmreg,xmmrm66 0f 3a 44 /r 10 Multiply the low half of the destination register by the high half of the source register.
PCLMULHQHQDQ xmmreg,xmmrm66 0f 3a 44 /r 11 Multiply the high halves of the two registers.

Added with Intel ADX

InstructionDescription
ADCXAdds two unsigned integers plus carry, reading the carry from the carry flag and if necessary setting it there. Does not affect other flags than the carry.
ADOXAdds two unsigned integers plus carry, reading the carry from the overflow flag and if necessary setting it there. Does not affect other flags than the overflow.

Added with Intel TSX

InstructionOpcodeDescription
XBEGIN rel16/32 C7 F8 cw/cd Start transaction. If transaction fails, perform a branch to the given relative offset.
XEND 0F 01 D5 End transaction.
XABORT imm8 C6 F8 ib Abort transaction with 8-bit immediate as error code.
XACQUIRE F2 Instruction prefix to indicate start of hardware lock elision, used with memory atomic instructions only (for other instructions, the F2 prefix may have other meanings). When used with such instructions, may start a transaction instead of performing the memory atomic operation.
XRELEASE F3 Instruction prefix to indicate end of hardware lock elision, used with memory atomic/store instructions only (for other instructions, the F3 prefix may have other meanings). When used with such instructions during hardware lock elision, will end the associated transaction instead of performing the store/atomic.

Added with Intel MPX

Intel MPX adds 4 new registers, BND0 to BND3, that each contains a pair of addresses. MPX also defines a bounds-table as a 2-level directory/table data structure in memory that contains sets of upper/lower bounds.

InstructionOpcodeDescriptionNotes
BMDMK b,m F3 0F 1B /r Make lower and upper bound from memory address expression. The lower bound is given by base component of address, the upper bound by 1-s complement of the address as a whole. Using RIP-relative addressing not permitted (results in #UD)
BNDCL b, r/m F3 0F 1A /r Check address against lower bound. Produces a #BR exception if the bounds check fails.
BNDCU b, r/m F2 0F 1A /r Check address against upper bound in 1's-complement form
BNDCN b, r/m F2 0F 1B /r Check address against upper bound
BMDMOV b, b/m 66 0F 1A /r Move a pair of memory bounds to/from memory or between bounds-registers
BNDMOV b/m, b 66 0F 1B /r
BNDLDX b,mib 0F 1A /r Load bounds from the bounds-table, using address translation using an sib-addressing expression mib Requires memory addressing modes that use the SIB byte.

Produces a #BR exception if bounds directory entry is not valid (which prevents address translation).

BNDSTX mib,b 0F 1B /r Store bounds into the bounds-table, using address translation using an sib-addressing expression mib
BND F2 Instruction prefix used with certain branch instructions to indicate that they should not clear the bounds registers. If the BNDPRESERVE config bit is not set, then branches without this prefix will clear all four bounds registers.

Added with Intel CET

CET adds two distinct features to help protect against security exploits such as return-oriented programming: a shadow stack (CET_SS), and indirect branch tracking (CET_IBT).

InstructionOpcodeDescriptionNotes
INCSSPD r32 F3 0F AE /5 Increment shadow stack pointer Shadow stack (CET_SS).

When shadow stacks are enabled, return addresses are pushed on both the regular stack and the shadow stack when a function call is made. They are then both popped on return from the function call - if they do not match, then the stack is assumed to be corrupted, and a #CP exception is issued.

The shadow stack is additionally required to be stored in specially marked memory pages which cannot be modified by normal memory store instructions.

INCSSPQ r64 F3 REX.W 0F AE /5
RDSSPD r32 F3 0F 1E /1 Read shadow stack pointer into register (low 32 bits)
RDSSPQ r64 F3 REX.W 0F 1E /1 Read shadow stack pointer into register (full 64 bits)
SAVEPREVSSP F3 0F 01 EA Save previous shadow stack pointer
RSTORSSP m64 F3 0F 01 /5 Restore saved shadow stack pointer
WRSSD m32,r32 0F 38 F6 /r Write 4 bytes to shadow stack
WRSSQ m64,r64 REX.W 0F 38 F6 /r Write 8 bytes to shadow stack
WRUSSD m32,r32 66 0F 38 F5 /r Write 4 bytes to user shadow stack
WRUSSQ m64,r64 66 REX.W 0F 38 F5 /r Write 8 bytes to user shadow stack
SETSSBSY F3 0F 01 E8 Mark shadow stack busy
CLRSSBSY m64 F3 0F AE /6 Clear shadow stack busy flag
ENDBR32 F3 0F 1E FB Terminate indirect branch in 32-bit mode Indirect Branch Tracking (CBT_IBT).

When IBT is enabled, an indirect branch (jump, call, return) to any instruction that is not an ENDBR32/64 instruction will cause a #CP exception.

ENDBR64 F3 0F 1E FA Terminate indirect branch in 64-bit mode
(no mnemonic) 3E Prefix used with indirect CALL/JMP near instructions (opcodes FF /2 and FF /4) to indicate that the branch target is not required to start with an ENDBR32/64 instruction. Prefix only honored when NO_TRACK_EN flag is set.

This prefix has the same encoding as the DS: segment override prefix - as of April 2022, Intel documentation does not appear to specify whether this prefix also retains its old segment-override function when used as a no-track prefix, nor does it provide an official mnemonic for this prefix.[47][48] (GNU binutils use "notrack"[49])

x87 floating-point instructions

Original 8087 instructions

InstructionMeaningNotes
F2XM1More precise than for x close to zero.

On 8087, only supported for .

On 80387 and later, supported for .

FABSAbsolute value
FADDAdd
FADDPAdd and pop
FBLDLoad BCD
FBSTPStore BCD and pop
FCHSChange sign
FCLEXClear exceptions
FCOMCompare
FCOMPCompare and pop
FCOMPPCompare and pop twice
FDECSTPDecrement floating point stack pointer
FDISIDisable interrupts8087 only, otherwise FNOP
FDIVDividePentium FDIV bug
FDIVPDivide and pop
FDIVRDivide reversed
FDIVRPDivide reversed and pop
FENIEnable interrupts8087 only, otherwise FNOP
FFREEFree register
FIADDInteger add
FICOMInteger compare
FICOMPInteger compare and pop
FIDIVInteger divide
FIDIVRInteger divide reversed
FILDLoad integer
FIMULInteger multiply
FINCSTPIncrement floating point stack pointer
FINITInitialize floating point processor
FISTStore integer
FISTPStore integer and pop
FISUBInteger subtract
FISUBRInteger subtract reversed
FLDFloating point load
FLD1Load 1.0 onto stack
FLDCWLoad control word
FLDENVLoad environment state
FLDENVWLoad environment state, 16-bit
FLDL2ELoad log2(e) onto stack Using round-to-nearest rounding on 8087.

Performing rounding based on rounding control on 80387 and later.

FLDL2TLoad log2(10) onto stack
FLDLG2Load log10(2) onto stack
FLDLN2Load ln(2) onto stack
FLDPILoad π onto stack
FLDZLoad 0.0 onto stack
FMULMultiply
FMULPMultiply and pop
FNCLEXClear exceptions, no wait
FNDISIDisable interrupts, no wait8087 only, otherwise FNOP
FNENIEnable interrupts, no wait8087 only, otherwise FNOP
FNINITInitialize floating point processor, no wait
FNOPNo operation
FNSAVESave FPU state, no wait, 8-bit
FNSAVEWSave FPU state, no wait, 16-bit
FNSTCWStore control word, no wait
FNSTENVStore FPU environment, no wait
FNSTENVWStore FPU environment, no wait, 16-bit
FNSTSWStore status word, no wait
FPATANPartial arctangentComputes , with adjustment for quadrant similar to C's atan2() function.

On 8087, only supported for . This restriction was removed on the 80387.

FPREMPartial remainderComputes remainder with same sign as dividend, which is not IEEE-compliant.

May compute a partial remainder, in which case it must be run again (signalled by C2 flag register).

FPTANPartial tangentOn 8087, only supported for

On 80387 and later, supported for

FRNDINTRound to integer
FRSTORRestore saved state
FRSTORWRestore saved statePerhaps not actually available in 8087
FSAVESave FPU state
FSAVEWSave FPU state, 16-bit
FSCALEScale by factor of 2
FSQRTSquare root
FSTFloating point store
FSTCWStore control word
FSTENVStore FPU environment
FSTENVWStore FPU environment, 16-bit
FSTPStore and pop
FSTSWStore status word
FSUBSubtract
FSUBPSubtract and pop
FSUBRReverse subtract
FSUBRPReverse subtract and pop
FTSTTest for zero
FWAITWait while FPU is executing
FXAMExamine condition flags
FXCHExchange registers
FXTRACTExtract exponent and significand
FYL2Xy · log2 xif y = logb 2, then the base-b logarithm is computed
FYL2XP1y · log2 (x+1)More precise than log2 z if x is close to zero.

Only supported for

Added with 80287

InstructionMeaningNotes
FSETPMSet protected mode80287 only, otherwise FNOP
FSTSW AXStore FPU Status word into CPU register

Added with 80387

InstructionMeaningNotes
FLDENVDLoad environment state, 32-bit
FSAVEDSave FPU state, 32-bit
FPREM1Partial remainderComputes IEEE remainder
FRSTORDRestore saved state, 32-bit
FSIN Sine Compute and/or .

Due to argument reduction being done with only about 68 bits of precision, is not precisely 1.0, but instead given by

.[50][51] This argument reduction inaccuracy also affects the FPTAN instruction.

FCOSCosine
FSINCOSSine and cosine
FSTENVDStore FPU environment, 32-bit
FUCOMUnordered compare
FUCOMPUnordered compare and pop
FUCOMPPUnordered compare and pop twice

Several 80387-class coprocessors provided extra instructions in addition to the standard 80387 ones, none of which are present in later processors:

Instruction Opcode Description Available on
FRSTPM DB F4[52]

or

DB E5[53]

FPU Reset Protected Mode.

Instruction to signal to the FPU that the main CPU is exiting protected mode, similar to how the FSETPM instruction is used to signal to the FPU that the CPU is entering protected mode.

Different sources provide different encodings for this instruction.

Intel 287XL
FNSTDW AX DF E1 Store FPU Device Word to AX Intel 387SL[53][54]
FNSTSG AX DF E2 Store FPU Signature Register to AX
FSBP0 DB E8 Select Coprocessor Register Bank 0 IIT 2c87, 3c87[53][55]
FSBP1 DB EB Select Coprocessor Register Bank 1
FSBP2 DB EA Select Coprocessor Register Bank 2
FSBP3 DB E9[56] Select Coprocessor Register Bank 3 (undocumented)
F4X4,

FMUL4X4

DB F1 Multiply 4-component vector with 4x4 matrix. For proper operation, the matrix must be preloaded into Coprocessor Register banks 1 and 2 (unique to IIT FPUs), and the vector must be loaded into Coprocessor Register Bank 0. Example code is available.[55][57]
FTSTP D9 E6 Equivalent to FTST followed by a stack pop. Cyrix 387+[57]
FRINT2 DB FC  Round st(0) to integer, with round-to-nearest rounding. Cyrix EMC87, 83s87, 83d87, 387+[57][53]
FRICHOP DD FC Round st(0) to integer, with round-to-zero rounding.
FRINEAR DF FC Round st(0) to integer, with round-to-nearest ties-away-from-zero rounding.

Added with Pentium Pro

  • FCMOV variants: FCMOVB, FCMOVBE, FCMOVE, FCMOVNB, FCMOVNBE, FCMOVNE, FCMOVNU, FCMOVU
  • FCOMI variants: FCOMI, FCOMIP, FUCOMI, FUCOMIP

Added with SSE

FXRSTOR, FXSAVE

These are also supported on later Pentium IIs which do not contain SSE support

Added with SSE3

FISTTP (x87 to integer conversion with truncation regardless of status word)

SIMD instructions

MMX instructions

MMX instructions operate on the mm registers, which are 64 bits wide. They are shared with the FPU registers.

Original MMX instructions

Added with Pentium MMX

InstructionOpcodeMeaningNotes
EMMS0F 77Empty MMX Technology StateMarks all x87 FPU registers for use by FPU
MOVD mm, r/m320F 6E /rMove doubleword
MOVD r/m32, mm0F 7E /rMove doubleword
MOVQ mm/m64, mm0F 7F /rMove quadword
MOVQ mm, mm/m640F 6F /rMove quadword
MOVQ mm, r/m64REX.W + 0F 6E /rMove quadword
MOVQ r/m64, mmREX.W + 0F 7E /rMove quadword
PACKSSDW mm1, mm2/m640F 6B /rPack doublewords to words (signed with saturation)
PACKSSWB mm1, mm2/m640F 63 /rPack words to bytes (signed with saturation)
PACKUSWB mm, mm/m640F 67 /rPack words to bytes (unsigned with saturation)
PADDB mm, mm/m640F FC /rAdd packed byte integers
PADDW mm, mm/m640F FD /rAdd packed word integers
PADDD mm, mm/m640F FE /rAdd packed doubleword integers
PADDQ mm, mm/m640F D4 /rAdd packed quadword integers
PADDSB mm, mm/m640F EC /rAdd packed signed byte integers and saturate
PADDSW mm, mm/m640F ED /rAdd packed signed word integers and saturate
PADDUSB mm, mm/m640F DC /rAdd packed unsigned byte integers and saturate
PADDUSW mm, mm/m640F DD /rAdd packed unsigned word integers and saturate
PAND mm, mm/m640F DB /rBitwise AND
PANDN mm, mm/m640F DF /rBitwise AND NOT
POR mm, mm/m640F EB /rBitwise OR
PXOR mm, mm/m640F EF /rBitwise XOR
PCMPEQB mm, mm/m640F 74 /rCompare packed bytes for equality
PCMPEQW mm, mm/m640F 75 /rCompare packed words for equality
PCMPEQD mm, mm/m640F 76 /rCompare packed doublewords for equality
PCMPGTB mm, mm/m640F 64 /rCompare packed signed byte integers for greater than
PCMPGTW mm, mm/m640F 65 /rCompare packed signed word integers for greater than
PCMPGTD mm, mm/m640F 66 /rCompare packed signed doubleword integers for greater than
PMADDWD mm, mm/m640F F5 /rMultiply packed words, add adjacent doubleword results
PMULHW mm, mm/m640F E5 /rMultiply packed signed word integers, store high 16 bits of results
PMULLW mm, mm/m640F D5 /rMultiply packed signed word integers, store low 16 bits of results
PSLLW mm1, imm80F 71 /6 ibShift left words, shift in zeros
PSLLW mm, mm/m640F F1 /rShift left words, shift in zeros
PSLLD mm, imm80F 72 /6 ibShift left doublewords, shift in zeros
PSLLD mm, mm/m640F F2 /rShift left doublewords, shift in zeros
PSLLQ mm, imm80F 73 /6 ibShift left quadword, shift in zeros
PSLLQ mm, mm/m640F F3 /rShift left quadword, shift in zeros
PSRAD mm, imm80F 72 /4 ibShift right doublewords, shift in sign bits
PSRAD mm, mm/m640F E2 /rShift right doublewords, shift in sign bits
PSRAW mm, imm80F 71 /4 ibShift right words, shift in sign bits
PSRAW mm, mm/m640F E1 /rShift right words, shift in sign bits
PSRLW mm, imm80F 71 /2 ibShift right words, shift in zeros
PSRLW mm, mm/m640F D1 /rShift right words, shift in zeros
PSRLD mm, imm80F 72 /2 ibShift right doublewords, shift in zeros
PSRLD mm, mm/m640F D2 /rShift right doublewords, shift in zeros
PSRLQ mm, imm80F 73 /2 ibShift right quadword, shift in zeros
PSRLQ mm, mm/m640F D3 /rShift right quadword, shift in zeros
PSUBB mm, mm/m640F F8 /rSubtract packed byte integers
PSUBW mm, mm/m640F F9 /rSubtract packed word integers
PSUBD mm, mm/m640F FA /rSubtract packed doubleword integers
PSUBSB mm, mm/m640F E8 /rSubtract signed packed bytes with saturation
PSUBSW mm, mm/m640F E9 /rSubtract signed packed words with saturation
PSUBUSB mm, mm/m640F D8 /rSubtract unsigned packed bytes with saturation
PSUBUSW mm, mm/m640F D9 /rSubtract unsigned packed words with saturation
PUNPCKHBW mm, mm/m640F 68 /rUnpack and interleave high-order bytes
PUNPCKHWD mm, mm/m640F 69 /rUnpack and interleave high-order words
PUNPCKHDQ mm, mm/m640F 6A /rUnpack and interleave high-order doublewords
PUNPCKLBW mm, mm/m320F 60 /rUnpack and interleave low-order bytes
PUNPCKLWD mm, mm/m320F 61 /rUnpack and interleave low-order words
PUNPCKLDQ mm, mm/m320F 62 /rUnpack and interleave low-order doublewords
EMMI instructions

Added with 6x86MX from Cyrix, deprecated now

PAVEB, PADDSIW, PMAGW, PDISTIB, PSUBSIW, PMVZB, PMULHRW, PMVNZB, PMVLZB, PMVGEZB, PMULHRIW, PMACHRIW

MMX instructions added with MMX+ and SSE

The following MMX instruction were added with SSE. They are also available on the Athlon under the name MMX+.

InstructionOpcodeMeaning
MASKMOVQ mm1, mm20F F7 /rMasked Move of Quadword
MOVNTQ m64, mm0F E7 /rMove Quadword Using Non-Temporal Hint
PSHUFW mm1, mm2/m64, imm80F 70 /r ibShuffle Packed Words
PINSRW mm, r32/m16, imm80F C4 /rInsert Word
PEXTRW reg, mm, imm80F C5 /rExtract Word
PMOVMSKB reg, mm0F D7 /rMove Byte Mask
PMINUB mm1, mm2/m640F DA /rMinimum of Packed Unsigned Byte Integers
PMAXUB mm1, mm2/m640F DE /rMaximum of Packed Unsigned Byte Integers
PAVGB mm1, mm2/m640F E0 /rAverage Packed Integers
PAVGW mm1, mm2/m640F E3 /rAverage Packed Integers
PMULHUW mm1, mm2/m640F E4 /rMultiply Packed Unsigned Integers and Store High Result
PMINSW mm1, mm2/m640F EA /rMinimum of Packed Signed Word Integers
PMAXSW mm1, mm2/m640F EE /rMaximum of Packed Signed Word Integers
PSADBW mm1, mm2/m640F F6 /rCompute Sum of Absolute Differences
MMX instructions added with SSE2

The following MMX instructions were added with SSE2:

InstructionOpcodeMeaning
PSUBQ mm1, mm2/m640F FB /rSubtract quadword integer
PMULUDQ mm1, mm2/m640F F4 /rMultiply unsigned doubleword integer
MMX instructions added with SSSE3
InstructionOpcodeMeaning
PSIGNB mm1, mm2/m640F 38 08 /rNegate/zero/preserve packed byte integers depending on corresponding sign
PSIGNW mm1, mm2/m640F 38 09 /rNegate/zero/preserve packed word integers depending on corresponding sign
PSIGND mm1, mm2/m640F 38 0A /rNegate/zero/preserve packed doubleword integers depending on corresponding sign
PSHUFB mm1, mm2/m640F 38 00 /rShuffle bytes
PMULHRSW mm1, mm2/m640F 38 0B /rMultiply 16-bit signed words, scale and round signed doublewords, pack high 16 bits
PMADDUBSW mm1, mm2/m640F 38 04 /rMultiply signed and unsigned bytes, add horizontal pair of signed words, pack saturated signed-words
PHSUBW mm1, mm2/m640F 38 05 /rSubtract and pack 16-bit signed integers horizontally
PHSUBSW mm1, mm2/m640F 38 07 /rSubtract and pack 16-bit signed integer horizontally with saturation
PHSUBD mm1, mm2/m640F 38 06 /rSubtract and pack 32-bit signed integers horizontally
PHADDSW mm1, mm2/m640F 38 03 /rAdd and pack 16-bit signed integers horizontally, pack saturated integers to mm1.
PHADDW mm1, mm2/m640F 38 01 /rAdd and pack 16-bit integers horizontally
PHADDD mm1, mm2/m640F 38 02 /rAdd and pack 32-bit integers horizontally
PALIGNR mm1, mm2/m64, imm80F 3A 0F /r ibConcatenate destination and source operands, extract byte-aligned result shifted to the right
PABSB mm1, mm2/m640F 38 1C /rCompute the absolute value of bytes and store unsigned result
PABSW mm1, mm2/m640F 38 1D /rCompute the absolute value of 16-bit integers and store unsigned result
PABSD mm1, mm2/m640F 38 1E /rCompute the absolute value of 32-bit integers and store unsigned result

3DNow! instructions

Added with K6-2

InstructionOpcodeMeaning
FEMMS0F 0EFaster Enter/Exit of the MMX or floating-point state
PAVGUSB mm1, mm2/m640F 0F /r BFAverage of unsigned packed 8-bit values
PF2ID mm1, mm2/m640F 0F /r 1DConverts packed floating-point operand to packed 32-bit integer
PFACC mm1, mm2/m640F 0F /r AEFloating-point accumulate
PFADD mm1, mm2/m640F 0F /r 9EPacked, floating-point addition
PFCMPEQ mm1, mm2/m640F 0F /r B0Packed floating-point comparison, equal to
PFCMPGE mm1, mm2/m640F 0F /r 90Packed floating-point comparison, greater than or equal to
PFCMPGT mm1, mm2/m640F 0F /r A0Packed floating-point comparison, greater than
PFMAX mm1, mm2/m640F 0F /r A4Packed floating-point maximum
PFMIN mm1, mm2/m640F 0F /r 94Packed floating-point minimum
PFMUL mm1, mm2/m640F 0F /r B4Packed floating-point multiplication
PFRCP mm1, mm2/m640F 0F /r 96Floating-point reciprocal approximation
PFRCPIT1 mm1, mm2/m640F 0F /r A6Packed floating-point reciprocal, first iteration step
PFRCPIT2 mm1, mm2/m640F 0F /r B6Packed floating-point reciprocal/reciprocal square root, second iteration step
PFRSQIT1 mm1, mm2/m640F 0F /r A7Packed floating-point reciprocal square root, first iteration step
PFRSQRT mm1, mm2/m640F 0F /r 97Floating-point reciprocal square root approximation
PFSUB mm1, mm2/m640F 0F /r 9APacked floating-point subtraction
PFSUBR mm1, mm2/m640F 0F /r AAPacked floating-point reverse subtraction
PI2FD mm1, mm2/m640F 0F /r 0DPacked 32-bit integer to floating-point conversion
PMULHRW mm1, mm2/m640F 0F /r B7Multiply signed packed 16-bit values with rounding and store the high 16 bits
PREFETCH m80F 0D /0Prefetch processor cache line into L1 data cache
PREFETCHW m80F 0D /1Prefetch processor cache line into L1 data cache with intent to write.

The PREFETCHW instruction is also supported on Intel CPUs starting with 65nm Pentium 4,[58] albeit executed as NOP until Broadwell.


Added with Athlon and K6-2+

InstructionOpcodeMeaningNotes
PF2IW mm1, mm2/m64 0F 0F /r 1C Packed Floating-point to 16-bit Integer Conversion Also present as undocumented instructions on original K6-2.[59]
PI2FW mm1, mm2/m64 0F 0F /r 0C Packed 16-bit Integer to Floating-point Conversion
PSWAPD mm1, mm2/m64 0F 0F /r BB Packed Swap Doubleword Uses same opcode as older undocumented K6-2 PSWAPW instruction.[59]
PFNACC mm1, mm2/m64 0F 0F /r 8A Packed Floating-Point Negative Accumulate
PFPNACC mm1, mm2/m64 0F 0F /r 8E Packed Floating-Point Positive-Negative Accumulate For complex number arithmetic.

Added with Geode GX

InstructionOpcodeMeaning
PFRCPV mm1, mm2/m640F 0F /r 86Packed Floating-point Reciprocal Approximation
PFRQSRTV mm1, mm2/m640F 0F /r 87Packed Floating-point Reciprocal Square Root Approximation

SSE instructions

Added with Pentium III

SSE instructions operate on xmm registers, which are 128 bit wide.

SSE consists of the following SSE SIMD floating-point instructions:

InstructionOpcodeMeaning
ANDPS* xmm1, xmm2/m1280F 54 /rBitwise Logical AND of Packed Single-Precision Floating-Point Values
ANDNPS* xmm1, xmm2/m1280F 55 /rBitwise Logical AND NOT of Packed Single-Precision Floating-Point Values
ORPS* xmm1, xmm2/m1280F 56 /rBitwise Logical OR of Single-Precision Floating-Point Values
XORPS* xmm1, xmm2/m1280F 57 /rBitwise Logical XOR for Single-Precision Floating-Point Values
MOVUPS xmm1, xmm2/m1280F 10 /rMove Unaligned Packed Single-Precision Floating-Point Values
MOVSS xmm1, xmm2/m32F3 0F 10 /rMove Scalar Single-Precision Floating-Point Values
MOVUPS xmm2/m128, xmm10F 11 /rMove Unaligned Packed Single-Precision Floating-Point Values
MOVSS xmm2/m32, xmm1F3 0F 11 /rMove Scalar Single-Precision Floating-Point Values
MOVLPS xmm, m640F 12 /rMove Low Packed Single-Precision Floating-Point Values
MOVHLPS xmm1, xmm20F 12 /rMove Packed Single-Precision Floating-Point Values High to Low
MOVLPS m64, xmm0F 13 /rMove Low Packed Single-Precision Floating-Point Values
UNPCKLPS xmm1, xmm2/m1280F 14 /rUnpack and Interleave Low Packed Single-Precision Floating-Point Values
UNPCKHPS xmm1, xmm2/m1280F 15 /rUnpack and Interleave High Packed Single-Precision Floating-Point Values
MOVHPS xmm, m640F 16 /rMove High Packed Single-Precision Floating-Point Values
MOVLHPS xmm1, xmm20F 16 /rMove Packed Single-Precision Floating-Point Values Low to High
MOVHPS m64, xmm0F 17 /rMove High Packed Single-Precision Floating-Point Values
MOVAPS xmm1, xmm2/m1280F 28 /rMove Aligned Packed Single-Precision Floating-Point Values
MOVAPS xmm2/m128, xmm10F 29 /rMove Aligned Packed Single-Precision Floating-Point Values
MOVNTPS m128, xmm10F 2B /rMove Aligned Four Packed Single-FP Non Temporal
MOVMSKPS reg, xmm0F 50 /rExtract Packed Single-Precision Floating-Point 4-bit Sign Mask. The upper bits of the register are filled with zeros.
CVTPI2PS xmm, mm/m640F 2A /rConvert Packed Dword Integers to Packed Single-Precision FP Values
CVTSI2SS xmm, r/m32F3 0F 2A /rConvert Dword Integer to Scalar Single-Precision FP Value
CVTSI2SS xmm, r/m64F3 REX.W 0F 2A /rConvert Qword Integer to Scalar Single-Precision FP Value
MOVNTPS m128, xmm0F 2B /rStore Packed Single-Precision Floating-Point Values Using Non-Temporal Hint
CVTTPS2PI mm, xmm/m640F 2C /rConvert with Truncation Packed Single-Precision FP Values to Packed Dword Integers
CVTTSS2SI r32, xmm/m32F3 0F 2C /rConvert with Truncation Scalar Single-Precision FP Value to Dword Integer
CVTTSS2SI r64, xmm1/m32F3 REX.W 0F 2C /rConvert with Truncation Scalar Single-Precision FP Value to Qword Integer
CVTPS2PI mm, xmm/m640F 2D /rConvert Packed Single-Precision FP Values to Packed Dword Integers
CVTSS2SI r32, xmm/m32F3 0F 2D /rConvert Scalar Single-Precision FP Value to Dword Integer
CVTSS2SI r64, xmm1/m32F3 REX.W 0F 2D /rConvert Scalar Single-Precision FP Value to Qword Integer
UCOMISS xmm1, xmm2/m320F 2E /rUnordered Compare Scalar Single-Precision Floating-Point Values and Set EFLAGS
COMISS xmm1, xmm2/m320F 2F /rCompare Scalar Ordered Single-Precision Floating-Point Values and Set EFLAGS
SQRTPS xmm1, xmm2/m1280F 51 /rCompute Square Roots of Packed Single-Precision Floating-Point Values
SQRTSS xmm1, xmm2/m32F3 0F 51 /rCompute Square Root of Scalar Single-Precision Floating-Point Value
RSQRTPS xmm1, xmm2/m1280F 52 /rCompute Reciprocal of Square Root of Packed Single-Precision Floating-Point Value
RSQRTSS xmm1, xmm2/m32F3 0F 52 /rCompute Reciprocal of Square Root of Scalar Single-Precision Floating-Point Value
RCPPS xmm1, xmm2/m1280F 53 /rCompute Reciprocal of Packed Single-Precision Floating-Point Values
RCPSS xmm1, xmm2/m32F3 0F 53 /rCompute Reciprocal of Scalar Single-Precision Floating-Point Values
ADDPS xmm1, xmm2/m1280F 58 /rAdd Packed Single-Precision Floating-Point Values
ADDSS xmm1, xmm2/m32F3 0F 58 /rAdd Scalar Single-Precision Floating-Point Values
MULPS xmm1, xmm2/m1280F 59 /rMultiply Packed Single-Precision Floating-Point Values
MULSS xmm1, xmm2/m32F3 0F 59 /rMultiply Scalar Single-Precision Floating-Point Values
SUBPS xmm1, xmm2/m1280F 5C /rSubtract Packed Single-Precision Floating-Point Values
SUBSS xmm1, xmm2/m32F3 0F 5C /rSubtract Scalar Single-Precision Floating-Point Values
MINPS xmm1, xmm2/m1280F 5D /rReturn Minimum Packed Single-Precision Floating-Point Values
MINSS xmm1, xmm2/m32F3 0F 5D /rReturn Minimum Scalar Single-Precision Floating-Point Values
DIVPS xmm1, xmm2/m1280F 5E /rDivide Packed Single-Precision Floating-Point Values
DIVSS xmm1, xmm2/m32F3 0F 5E /rDivide Scalar Single-Precision Floating-Point Values
MAXPS xmm1, xmm2/m1280F 5F /rReturn Maximum Packed Single-Precision Floating-Point Values
MAXSS xmm1, xmm2/m32F3 0F 5F /rReturn Maximum Scalar Single-Precision Floating-Point Values
LDMXCSR m320F AE /2Load MXCSR Register State
STMXCSR m320F AE /3Store MXCSR Register State
CMPPS xmm1, xmm2/m128, imm80F C2 /r ibCompare Packed Single-Precision Floating-Point Values
CMPSS xmm1, xmm2/m32, imm8F3 0F C2 /r ibCompare Scalar Single-Precision Floating-Point Values
SHUFPS xmm1, xmm2/m128, imm80F C6 /r ibShuffle Packed Single-Precision Floating-Point Values
  • The floating point single bitwise operations ANDPS, ANDNPS, ORPS and XORPS produce the same result as the SSE2 integer (PAND, PANDN, POR, PXOR) and double ones (ANDPD, ANDNPD, ORPD, XORPD), but can introduce extra latency for domain changes when applied values of the wrong type.[60]

SSE2 instructions

Added with Pentium 4

SSE2 data movement instructions
InstructionOpcodeMeaning
MOVAPD xmm1, xmm2/m12866 0F 28 /rMove Aligned Packed Double-Precision Floating-Point Values
MOVAPD xmm2/m128, xmm166 0F 29 /rMove Aligned Packed Double-Precision Floating-Point Values
MOVNTPD m128, xmm166 0F 2B /rStore Packed Double-Precision Floating-Point Values Using Non-Temporal Hint
MOVHPD xmm1, m6466 0F 16 /rMove High Packed Double-Precision Floating-Point Value
MOVHPD m64, xmm166 0F 17 /rMove High Packed Double-Precision Floating-Point Value
MOVLPD xmm1, m6466 0F 12 /rMove Low Packed Double-Precision Floating-Point Value
MOVLPD m64, xmm166 0F 13/rMove Low Packed Double-Precision Floating-Point Value
MOVUPD xmm1, xmm2/m12866 0F 10 /rMove Unaligned Packed Double-Precision Floating-Point Values
MOVUPD xmm2/m128, xmm166 0F 11 /rMove Unaligned Packed Double-Precision Floating-Point Values
MOVMSKPD reg, xmm66 0F 50 /rExtract Packed Double-Precision Floating-Point Sign Mask
MOVSD* xmm1, xmm2/m64F2 0F 10 /rMove or Merge Scalar Double-Precision Floating-Point Value
MOVSD xmm1/m64, xmm2F2 0F 11 /rMove or Merge Scalar Double-Precision Floating-Point Value
SSE2 packed arithmetic instructions
InstructionOpcodeMeaning
ADDPD xmm1, xmm2/m12866 0F 58 /rAdd Packed Double-Precision Floating-Point Values
ADDSD xmm1, xmm2/m64F2 0F 58 /rAdd Low Double-Precision Floating-Point Value
DIVPD xmm1, xmm2/m12866 0F 5E /rDivide Packed Double-Precision Floating-Point Values
DIVSD xmm1, xmm2/m64F2 0F 5E /rDivide Scalar Double-Precision Floating-Point Value
MAXPD xmm1, xmm2/m12866 0F 5F /rMaximum of Packed Double-Precision Floating-Point Values
MAXSD xmm1, xmm2/m64F2 0F 5F /rReturn Maximum Scalar Double-Precision Floating-Point Value
MINPD xmm1, xmm2/m12866 0F 5D /rMinimum of Packed Double-Precision Floating-Point Values
MINSD xmm1, xmm2/m64F2 0F 5D /rReturn Minimum Scalar Double-Precision Floating-Point Value
MULPD xmm1, xmm2/m12866 0F 59 /rMultiply Packed Double-Precision Floating-Point Values
MULSD xmm1,xmm2/m64F2 0F 59 /rMultiply Scalar Double-Precision Floating-Point Value
SQRTPD xmm1, xmm2/m12866 0F 51 /rSquare Root of Double-Precision Floating-Point Values
SQRTSD xmm1,xmm2/m64F2 0F 51/rCompute Square Root of Scalar Double-Precision Floating-Point Value
SUBPD xmm1, xmm2/m12866 0F 5C /rSubtract Packed Double-Precision Floating-Point Values
SUBSD xmm1, xmm2/m64F2 0F 5C /rSubtract Scalar Double-Precision Floating-Point Value
SSE2 logical instructions
InstructionOpcodeMeaning
ANDPD xmm1, xmm2/m12866 0F 54 /rBitwise Logical AND of Packed Double Precision Floating-Point Values
ANDNPD xmm1, xmm2/m12866 0F 55 /rBitwise Logical AND NOT of Packed Double Precision Floating-Point Values
ORPD xmm1, xmm2/m12866 0F 56/rBitwise Logical OR of Packed Double Precision Floating-Point Values
XORPD xmm1, xmm2/m12866 0F 57/rBitwise Logical XOR of Packed Double Precision Floating-Point Values
SSE2 compare instructions
InstructionOpcodeMeaning
CMPPD xmm1, xmm2/m128, imm866 0F C2 /r ibCompare Packed Double-Precision Floating-Point Values
CMPSD* xmm1, xmm2/m64, imm8F2 0F C2 /r ibCompare Low Double-Precision Floating-Point Values
COMISD xmm1, xmm2/m6466 0F 2F /rCompare Scalar Ordered Double-Precision Floating-Point Values and Set EFLAGS
UCOMISD xmm1, xmm2/m6466 0F 2E /rUnordered Compare Scalar Double-Precision Floating-Point Values and Set EFLAGS
SSE2 shuffle and unpack instructions
InstructionOpcodeMeaning
SHUFPD xmm1, xmm2/m128, imm866 0F C6 /r ibPacked Interleave Shuffle of Pairs of Double-Precision Floating-Point Values
UNPCKHPD xmm1, xmm2/m12866 0F 15 /rUnpack and Interleave High Packed Double-Precision Floating-Point Values
UNPCKLPD xmm1, xmm2/m12866 0F 14 /rUnpack and Interleave Low Packed Double-Precision Floating-Point Values
SSE2 conversion instructions
InstructionOpcodeMeaning
CVTDQ2PD xmm1, xmm2/m64F3 0F E6 /rConvert Packed Doubleword Integers to Packed Double-Precision Floating-Point Values
CVTDQ2PS xmm1, xmm2/m1280F 5B /rConvert Packed Doubleword Integers to Packed Single-Precision Floating-Point Values
CVTPD2DQ xmm1, xmm2/m128F2 0F E6 /rConvert Packed Double-Precision Floating-Point Values to Packed Doubleword Integers
CVTPD2PI mm, xmm/m12866 0F 2D /rConvert Packed Double-Precision FP Values to Packed Dword Integers
CVTPD2PS xmm1, xmm2/m12866 0F 5A /rConvert Packed Double-Precision Floating-Point Values to Packed Single-Precision Floating-Point Values
CVTPI2PD xmm, mm/m6466 0F 2A /rConvert Packed Dword Integers to Packed Double-Precision FP Values
CVTPS2DQ xmm1, xmm2/m12866 0F 5B /rConvert Packed Single-Precision Floating-Point Values to Packed Signed Doubleword Integer Values
CVTPS2PD xmm1, xmm2/m640F 5A /rConvert Packed Single-Precision Floating-Point Values to Packed Double-Precision Floating-Point Values
CVTSD2SI r32, xmm1/m64F2 0F 2D /rConvert Scalar Double-Precision Floating-Point Value to Doubleword Integer
CVTSD2SI r64, xmm1/m64F2 REX.W 0F 2D /rConvert Scalar Double-Precision Floating-Point Value to Quadword Integer With Sign Extension
CVTSD2SS xmm1, xmm2/m64F2 0F 5A /rConvert Scalar Double-Precision Floating-Point Value to Scalar Single-Precision Floating-Point Value
CVTSI2SD xmm1, r32/m32F2 0F 2A /rConvert Doubleword Integer to Scalar Double-Precision Floating-Point Value
CVTSI2SD xmm1, r/m64F2 REX.W 0F 2A /rConvert Quadword Integer to Scalar Double-Precision Floating-Point value
CVTSS2SD xmm1, xmm2/m32F3 0F 5A /rConvert Scalar Single-Precision Floating-Point Value to Scalar Double-Precision Floating-Point Value
CVTTPD2DQ xmm1, xmm2/m12866 0F E6 /rConvert with Truncation Packed Double-Precision Floating-Point Values to Packed Doubleword Integers
CVTTPD2PI mm, xmm/m12866 0F 2C /rConvert with Truncation Packed Double-Precision FP Values to Packed Dword Integers
CVTTPS2DQ xmm1, xmm2/m128F3 0F 5B /rConvert with Truncation Packed Single-Precision Floating-Point Values to Packed Signed Doubleword Integer Values
CVTTSD2SI r32, xmm1/m64F2 0F 2C /rConvert with Truncation Scalar Double-Precision Floating-Point Value to Signed Dword Integer
CVTTSD2SI r64, xmm1/m64F2 REX.W 0F 2C /rConvert with Truncation Scalar Double-Precision Floating-Point Value To Signed Qword Integer
SSE2 MMX-like instructions extended to SSE registers

SSE2 allows execution of MMX instructions on SSE registers, processing twice the amount of data at once.

InstructionOpcodeMeaning
MOVD xmm, r/m3266 0F 6E /rMove doubleword
MOVD r/m32, xmm66 0F 7E /rMove doubleword
MOVQ xmm1, xmm2/m64F3 0F 7E /rMove quadword
MOVQ xmm2/m64, xmm166 0F D6 /rMove quadword
MOVQ r/m64, xmm66 REX.W 0F 7E /rMove quadword
MOVQ xmm, r/m6466 REX.W 0F 6E /rMove quadword
PMOVMSKB reg, xmm66 0F D7 /rMove a byte mask, zeroing the upper bits of the register
PEXTRW reg, xmm, imm866 0F C5 /r ibExtract specified word and move it to reg, setting bits 15-0 and zeroing the rest
PINSRW xmm, r32/m16, imm866 0F C4 /r ibMove low word at the specified word position
PACKSSDW xmm1, xmm2/m12866 0F 6B /rConverts 4 packed signed doubleword integers into 8 packed signed word integers with saturation
PACKSSWB xmm1, xmm2/m12866 0F 63 /rConverts 8 packed signed word integers into 16 packed signed byte integers with saturation
PACKUSWB xmm1, xmm2/m12866 0F 67 /rConverts 8 signed word integers into 16 unsigned byte integers with saturation
PADDB xmm1, xmm2/m12866 0F FC /rAdd packed byte integers
PADDW xmm1, xmm2/m12866 0F FD /rAdd packed word integers
PADDD xmm1, xmm2/m12866 0F FE /rAdd packed doubleword integers
PADDQ xmm1, xmm2/m12866 0F D4 /rAdd packed quadword integers.
PADDSB xmm1, xmm2/m12866 0F EC /rAdd packed signed byte integers with saturation
PADDSW xmm1, xmm2/m12866 0F ED /rAdd packed signed word integers with saturation
PADDUSB xmm1, xmm2/m12866 0F DC /rAdd packed unsigned byte integers with saturation
PADDUSW xmm1, xmm2/m12866 0F DD /rAdd packed unsigned word integers with saturation
PAND xmm1, xmm2/m12866 0F DB /rBitwise AND
PANDN xmm1, xmm2/m12866 0F DF /rBitwise AND NOT
POR xmm1, xmm2/m12866 0F EB /rBitwise OR
PXOR xmm1, xmm2/m12866 0F EF /rBitwise XOR
PCMPEQB xmm1, xmm2/m12866 0F 74 /rCompare packed bytes for equality.
PCMPEQW xmm1, xmm2/m12866 0F 75 /rCompare packed words for equality.
PCMPEQD xmm1, xmm2/m12866 0F 76 /rCompare packed doublewords for equality.
PCMPGTB xmm1, xmm2/m12866 0F 64 /rCompare packed signed byte integers for greater than
PCMPGTW xmm1, xmm2/m12866 0F 65 /rCompare packed signed word integers for greater than
PCMPGTD xmm1, xmm2/m12866 0F 66 /rCompare packed signed doubleword integers for greater than
PMULLW xmm1, xmm2/m12866 0F D5 /rMultiply packed signed word integers with saturation
PMULHW xmm1, xmm2/m12866 0F E5 /rMultiply the packed signed word integers, store the high 16 bits of the results
PMULHUW xmm1, xmm2/m12866 0F E4 /rMultiply packed unsigned word integers, store the high 16 bits of the results
PMULUDQ xmm1, xmm2/m12866 0F F4 /rMultiply packed unsigned doubleword integers
PSLLW xmm1, xmm2/m12866 0F F1 /rShift words left while shifting in 0s
PSLLW xmm1, imm866 0F 71 /6 ibShift words left while shifting in 0s
PSLLD xmm1, xmm2/m12866 0F F2 /rShift doublewords left while shifting in 0s
PSLLD xmm1, imm866 0F 72 /6 ibShift doublewords left while shifting in 0s
PSLLQ xmm1, xmm2/m12866 0F F3 /rShift quadwords left while shifting in 0s
PSLLQ xmm1, imm866 0F 73 /6 ibShift quadwords left while shifting in 0s
PSRAD xmm1, xmm2/m12866 0F E2 /rShift doubleword right while shifting in sign bits
PSRAD xmm1, imm866 0F 72 /4 ibShift doublewords right while shifting in sign bits
PSRAW xmm1, xmm2/m12866 0F E1 /rShift words right while shifting in sign bits
PSRAW xmm1, imm866 0F 71 /4 ibShift words right while shifting in sign bits
PSRLW xmm1, xmm2/m12866 0F D1 /rShift words right while shifting in 0s
PSRLW xmm1, imm866 0F 71 /2 ibShift words right while shifting in 0s
PSRLD xmm1, xmm2/m12866 0F D2 /rShift doublewords right while shifting in 0s
PSRLD xmm1, imm866 0F 72 /2 ibShift doublewords right while shifting in 0s
PSRLQ xmm1, xmm2/m12866 0F D3 /rShift quadwords right while shifting in 0s
PSRLQ xmm1, imm866 0F 73 /2 ibShift quadwords right while shifting in 0s
PSUBB xmm1, xmm2/m12866 0F F8 /rSubtract packed byte integers
PSUBW xmm1, xmm2/m12866 0F F9 /rSubtract packed word integers
PSUBD xmm1, xmm2/m12866 0F FA /rSubtract packed doubleword integers
PSUBQ xmm1, xmm2/m12866 0F FB /rSubtract packed quadword integers.
PSUBSB xmm1, xmm2/m12866 0F E8 /rSubtract packed signed byte integers with saturation
PSUBSW xmm1, xmm2/m12866 0F E9 /rSubtract packed signed word integers with saturation
PMADDWD xmm1, xmm2/m12866 0F F5 /rMultiply the packed word integers, add adjacent doubleword results
PSUBUSB xmm1, xmm2/m12866 0F D8 /rSubtract packed unsigned byte integers with saturation
PSUBUSW xmm1, xmm2/m12866 0F D9 /rSubtract packed unsigned word integers with saturation
PUNPCKHBW xmm1, xmm2/m12866 0F 68 /rUnpack and interleave high-order bytes
PUNPCKHWD xmm1, xmm2/m12866 0F 69 /rUnpack and interleave high-order words
PUNPCKHDQ xmm1, xmm2/m12866 0F 6A /rUnpack and interleave high-order doublewords
PUNPCKLBW xmm1, xmm2/m12866 0F 60 /rInterleave low-order bytes
PUNPCKLWD xmm1, xmm2/m12866 0F 61 /rInterleave low-order words
PUNPCKLDQ xmm1, xmm2/m12866 0F 62 /rInterleave low-order doublewords
PAVGB xmm1, xmm2/m12866 0F E0, /rAverage packed unsigned byte integers with rounding
PAVGW xmm1, xmm2/m12866 0F E3 /rAverage packed unsigned word integers with rounding
PMINUB xmm1, xmm2/m12866 0F DA /rCompare packed unsigned byte integers and store packed minimum values
PMINSW xmm1, xmm2/m12866 0F EA /rCompare packed signed word integers and store packed minimum values
PMAXSW xmm1, xmm2/m12866 0F EE /rCompare packed signed word integers and store maximum packed values
PMAXUB xmm1, xmm2/m12866 0F DE /rCompare packed unsigned byte integers and store packed maximum values
PSADBW xmm1, xmm2/m12866 0F F6 /rComputes the absolute differences of the packed unsigned byte integers; the 8 low differences and 8 high differences are then summed separately to produce two unsigned word integer results
SSE2 integer instructions for SSE registers only

The following instructions can be used only on SSE registers, since by their nature they do not work on MMX registers

InstructionOpcodeMeaning
MASKMOVDQU xmm1, xmm266 0F F7 /rNon-Temporal Store of Selected Bytes from an XMM Register into Memory
MOVDQ2Q mm, xmmF2 0F D6 /rMove low quadword from XMM to MMX register.
MOVDQA xmm1, xmm2/m12866 0F 6F /rMove aligned double quadword
MOVDQA xmm2/m128, xmm166 0F 7F /rMove aligned double quadword
MOVDQU xmm1, xmm2/m128F3 0F 6F /rMove unaligned double quadword
MOVDQU xmm2/m128, xmm1F3 0F 7F /rMove unaligned double quadword
MOVQ2DQ xmm, mmF3 0F D6 /rMove quadword from MMX register to low quadword of XMM register
MOVNTDQ m128, xmm166 0F E7 /rStore Packed Integers Using Non-Temporal Hint
PSHUFHW xmm1, xmm2/m128, imm8F3 0F 70 /r ibShuffle packed high words.
PSHUFLW xmm1, xmm2/m128, imm8F2 0F 70 /r ibShuffle packed low words.
PSHUFD xmm1, xmm2/m128, imm866 0F 70 /r ibShuffle packed doublewords.
PSLLDQ xmm1, imm866 0F 73 /7 ibPacked shift left logical double quadwords.
PSRLDQ xmm1, imm866 0F 73 /3 ibPacked shift right logical double quadwords.
PUNPCKHQDQ xmm1, xmm2/m12866 0F 6D /rUnpack and interleave high-order quadwords,
PUNPCKLQDQ xmm1, xmm2/m12866 0F 6C /rInterleave low quadwords,

SSE3 instructions

Added with Pentium 4 supporting SSE3

SSE3 SIMD floating-point instructions

InstructionOpcodeMeaningNotes
ADDSUBPS xmm1, xmm2/m128F2 0F D0 /rAdd/subtract single-precision floating-point valuesfor Complex Arithmetic
ADDSUBPD xmm1, xmm2/m12866 0F D0 /rAdd/subtract double-precision floating-point values
MOVDDUP xmm1, xmm2/m64F2 0F 12 /rMove double-precision floating-point value and duplicate
MOVSLDUP xmm1, xmm2/m128F3 0F 12 /rMove and duplicate even index single-precision floating-point values
MOVSHDUP xmm1, xmm2/m128F3 0F 16 /rMove and duplicate odd index single-precision floating-point values
HADDPS xmm1, xmm2/m128F2 0F 7C /rHorizontal add packed single-precision floating-point valuesfor Graphics
HADDPD xmm1, xmm2/m12866 0F 7C /rHorizontal add packed double-precision floating-point values
HSUBPS xmm1, xmm2/m128F2 0F 7D /rHorizontal subtract packed single-precision floating-point values
HSUBPD xmm1, xmm2/m12866 0F 7D /rHorizontal subtract packed double-precision floating-point values

SSE3 SIMD integer instructions

InstructionOpcodeMeaningNotes
LDDQU xmm1, memF2 0F F0 /rLoad unaligned data and return double quadwordInstructionally equivalent to MOVDQU. For video encoding

SSSE3 instructions

Added with Xeon 5100 series and initial Core 2

The following MMX-like instructions extended to SSE registers were added with SSSE3

InstructionOpcodeMeaning
PSIGNB xmm1, xmm2/m12866 0F 38 08 /rNegate/zero/preserve packed byte integers depending on corresponding sign
PSIGNW xmm1, xmm2/m12866 0F 38 09 /rNegate/zero/preserve packed word integers depending on corresponding sign
PSIGND xmm1, xmm2/m12866 0F 38 0A /rNegate/zero/preserve packed doubleword integers depending on corresponding
PSHUFB xmm1, xmm2/m12866 0F 38 00 /rShuffle bytes
PMULHRSW xmm1, xmm2/m12866 0F 38 0B /rMultiply 16-bit signed words, scale and round signed doublewords, pack high 16 bits
PMADDUBSW xmm1, xmm2/m12866 0F 38 04 /rMultiply signed and unsigned bytes, add horizontal pair of signed words, pack saturated signed-words
PHSUBW xmm1, xmm2/m12866 0F 38 05 /rSubtract and pack 16-bit signed integers horizontally
PHSUBSW xmm1, xmm2/m12866 0F 38 07 /rSubtract and pack 16-bit signed integer horizontally with saturation
PHSUBD xmm1, xmm2/m12866 0F 38 06 /rSubtract and pack 32-bit signed integers horizontally
PHADDSW xmm1, xmm2/m12866 0F 38 03 /rAdd and pack 16-bit signed integers horizontally with saturation
PHADDW xmm1, xmm2/m12866 0F 38 01 /rAdd and pack 16-bit integers horizontally
PHADDD xmm1, xmm2/m12866 0F 38 02 /rAdd and pack 32-bit integers horizontally
PALIGNR xmm1, xmm2/m128, imm866 0F 3A 0F /r ibConcatenate destination and source operands, extract byte-aligned result shifted to the right
PABSB xmm1, xmm2/m12866 0F 38 1C /rCompute the absolute value of bytes and store unsigned result
PABSW xmm1, xmm2/m12866 0F 38 1D /rCompute the absolute value of 16-bit integers and store unsigned result
PABSD xmm1, xmm2/m12866 0F 38 1E /rCompute the absolute value of 32-bit integers and store unsigned result

SSE4.1

Added with Core 2 manufactured in 45nm

SSE4.1 SIMD floating-point instructions
InstructionOpcodeMeaning
DPPS xmm1, xmm2/m128, imm866 0F 3A 40 /r ibSelectively multiply packed SP floating-point values, add and selectively store
DPPD xmm1, xmm2/m128, imm866 0F 3A 41 /r ibSelectively multiply packed DP floating-point values, add and selectively store
BLENDPS xmm1, xmm2/m128, imm866 0F 3A 0C /r ibSelect packed single precision floating-point values from specified mask
BLENDVPS xmm1, xmm2/m128, <XMM0>66 0F 38 14 /rSelect packed single precision floating-point values from specified mask
BLENDPD xmm1, xmm2/m128, imm866 0F 3A 0D /r ibSelect packed DP-FP values from specified mask
BLENDVPD xmm1, xmm2/m128 , <XMM0>66 0F 38 15 /rSelect packed DP FP values from specified mask
ROUNDPS xmm1, xmm2/m128, imm866 0F 3A 08 /r ibRound packed single precision floating-point values
ROUNDSS xmm1, xmm2/m32, imm866 0F 3A 0A /r ibRound the low packed single precision floating-point value
ROUNDPD xmm1, xmm2/m128, imm866 0F 3A 09 /r ibRound packed double precision floating-point values
ROUNDSD xmm1, xmm2/m64, imm866 0F 3A 0B /r ibRound the low packed double precision floating-point value
INSERTPS xmm1, xmm2/m32, imm866 0F 3A 21 /r ibInsert a selected single-precision floating-point value at the specified destination element and zero out destination elements
EXTRACTPS reg/m32, xmm1, imm866 0F 3A 17 /r ibExtract one single-precision floating-point value at specified offset and store the result (zero-extended, if applicable)
SSE4.1 SIMD integer instructions
InstructionOpcodeMeaning
MPSADBW xmm1, xmm2/m128, imm866 0F 3A 42 /r ibSums absolute 8-bit integer difference of adjacent groups of 4 byte integers with starting offset
PHMINPOSUW xmm1, xmm2/m12866 0F 38 41 /rFind the minimum unsigned word
PMULLD xmm1, xmm2/m12866 0F 38 40 /rMultiply the packed dword signed integers and store the low 32 bits
PMULDQ xmm1, xmm2/m12866 0F 38 28 /rMultiply packed signed doubleword integers and store quadword result
PBLENDVB xmm1, xmm2/m128, <XMM0>66 0F 38 10 /rSelect byte values from specified mask
PBLENDW xmm1, xmm2/m128, imm866 0F 3A 0E /r ibSelect words from specified mask
PMINSB xmm1, xmm2/m12866 0F 38 38 /rCompare packed signed byte integers
PMINUW xmm1, xmm2/m12866 0F 38 3A/rCompare packed unsigned word integers
PMINSD xmm1, xmm2/m12866 0F 38 39 /rCompare packed signed dword integers
PMINUD xmm1, xmm2/m12866 0F 38 3B /rCompare packed unsigned dword integers
PMAXSB xmm1, xmm2/m12866 0F 38 3C /rCompare packed signed byte integers
PMAXUW xmm1, xmm2/m12866 0F 38 3E/rCompare packed unsigned word integers
PMAXSD xmm1, xmm2/m12866 0F 38 3D /rCompare packed signed dword integers
PMAXUD xmm1, xmm2/m12866 0F 38 3F /rCompare packed unsigned dword integers
PINSRB xmm1, r32/m8, imm866 0F 3A 20 /r ibInsert a byte integer value at specified destination element
PINSRD xmm1, r/m32, imm866 0F 3A 22 /r ibInsert a dword integer value at specified destination element
PINSRQ xmm1, r/m64, imm866 REX.W 0F 3A 22 /r ibInsert a qword integer value at specified destination element
PEXTRB reg/m8, xmm2, imm866 0F 3A 14 /r ibExtract a byte integer value at source byte offset, upper bits are zeroed.
PEXTRW reg/m16, xmm, imm866 0F 3A 15 /r ibExtract word and copy to lowest 16 bits, zero-extended
PEXTRD r/m32, xmm2, imm866 0F 3A 16 /r ibExtract a dword integer value at source dword offset
PEXTRQ r/m64, xmm2, imm866 REX.W 0F 3A 16 /r ibExtract a qword integer value at source qword offset
PMOVSXBW xmm1, xmm2/m6466 0f 38 20 /rSign extend 8 packed 8-bit integers to 8 packed 16-bit integers
PMOVZXBW xmm1, xmm2/m6466 0f 38 30 /rZero extend 8 packed 8-bit integers to 8 packed 16-bit integers
PMOVSXBD xmm1, xmm2/m3266 0f 38 21 /rSign extend 4 packed 8-bit integers to 4 packed 32-bit integers
PMOVZXBD xmm1, xmm2/m3266 0f 38 31 /rZero extend 4 packed 8-bit integers to 4 packed 32-bit integers
PMOVSXBQ xmm1, xmm2/m1666 0f 38 22 /rSign extend 2 packed 8-bit integers to 2 packed 64-bit integers
PMOVZXBQ xmm1, xmm2/m1666 0f 38 32 /rZero extend 2 packed 8-bit integers to 2 packed 64-bit integers
PMOVSXWD xmm1, xmm2/m6466 0f 38 23/rSign extend 4 packed 16-bit integers to 4 packed 32-bit integers
PMOVZXWD xmm1, xmm2/m6466 0f 38 33 /rZero extend 4 packed 16-bit integers to 4 packed 32-bit integers
PMOVSXWQ xmm1, xmm2/m3266 0f 38 24 /rSign extend 2 packed 16-bit integers to 2 packed 64-bit integers
PMOVZXWQ xmm1, xmm2/m3266 0f 38 34 /rZero extend 2 packed 16-bit integers to 2 packed 64-bit integers
PMOVSXDQ xmm1, xmm2/m6466 0f 38 25 /rSign extend 2 packed 32-bit integers to 2 packed 64-bit integers
PMOVZXDQ xmm1, xmm2/m6466 0f 38 35 /rZero extend 2 packed 32-bit integers to 2 packed 64-bit integers
PTEST xmm1, xmm2/m12866 0F 38 17 /rSet ZF if AND result is all 0s, set CF if AND NOT result is all 0s
PCMPEQQ xmm1, xmm2/m12866 0F 38 29 /rCompare packed qwords for equality
PACKUSDW xmm1, xmm2/m12866 0F 38 2B /rConvert 2 × 4 packed signed doubleword integers into 8 packed unsigned word integers with saturation
MOVNTDQA xmm1, m12866 0F 38 2A /rMove double quadword using non-temporal hint if WC memory type

SSE4a

Added with Phenom processors

InstructionOpcodeMeaning
EXTRQ 66 0F 78 /0 ib ib Extract Field From Register
66 0F 79 /r
INSERTQF2 0F 78 /r ib ib Insert Field
F2 0F 79 /r
MOVNTSDF2 0F 2B /rMove Non-Temporal Scalar Double-Precision Floating-Point
MOVNTSSF3 0F 2B /rMove Non-Temporal Scalar Single-Precision Floating-Point

SSE4.2

Added with Nehalem processors

InstructionOpcodeMeaning
PCMPESTRI xmm1, xmm2/m128, imm866 0F 3A 61 /r imm8Packed comparison of string data with explicit lengths, generating an index
PCMPESTRM xmm1, xmm2/m128, imm866 0F 3A 60 /r imm8Packed comparison of string data with explicit lengths, generating a mask
PCMPISTRI xmm1, xmm2/m128, imm866 0F 3A 63 /r imm8Packed comparison of string data with implicit lengths, generating an index
PCMPISTRM xmm1, xmm2/m128, imm866 0F 3A 62 /r imm8Packed comparison of string data with implicit lengths, generating a mask
PCMPGTQ xmm1,xmm2/m12866 0F 38 37 /rCompare packed signed qwords for greater than.

SSE5 derived instructions

SSE5 was a proposed SSE extension by AMD. The bundle did not include the full set of Intel's SSE4 instructions, making it a competitor to SSE4 rather than a successor. AMD chose not to implement SSE5 as originally proposed, however, derived SSE extensions were introduced.

XOP

Introduced with the bulldozer processor core, removed again from Zen (microarchitecture) onward.

A revision of most of the SSE5 instruction set

F16C

Half-precision floating-point conversion.

InstructionMeaning
VCVTPH2PS xmmreg,xmmrm64Convert four half-precision floating point values in memory or the bottom half of an XMM register to four single-precision floating-point values in an XMM register
VCVTPH2PS ymmreg,xmmrm128Convert eight half-precision floating point values in memory or an XMM register (the bottom half of a YMM register) to eight single-precision floating-point values in a YMM register
VCVTPS2PH xmmrm64,xmmreg,imm8Convert four single-precision floating point values in an XMM register to half-precision floating-point values in memory or the bottom half an XMM register
VCVTPS2PH xmmrm128,ymmreg,imm8Convert eight single-precision floating point values in a YMM register to half-precision floating-point values in memory or an XMM register

FMA3

Supported in AMD processors starting with the Piledriver architecture and Intel starting with Haswell processors and Broadwell processors since 2014.

Fused multiply-add (floating-point vector multiply–accumulate) with three operands.

InstructionMeaning
VFMADD132PDFused Multiply-Add of Packed Double-Precision Floating-Point Values
VFMADD213PD
VFMADD231PD
VFMADD132PSFused Multiply-Add of Packed Single-Precision Floating-Point Values
VFMADD213PS
VFMADD231PS
VFMADD132SDFused Multiply-Add of Scalar Double-Precision Floating-Point Values
VFMADD213SD
VFMADD231SD
VFMADD132SSFused Multiply-Add of Scalar Single-Precision Floating-Point Values
VFMADD213SS
VFMADD231SS
VFMADDSUB132PDFused Multiply-Alternating Add/Subtract of Packed Double-Precision Floating-Point Values
VFMADDSUB213PD
VFMADDSUB231PD
VFMADDSUB132PSFused Multiply-Alternating Add/Subtract of Packed Single-Precision Floating-Point Values
VFMADDSUB213PS
VFMADDSUB231PS
VFMSUB132PDFused Multiply-Subtract of Packed Double-Precision Floating-Point Values
VFMSUB213PD
VFMSUB231PD
VFMSUB132PSFused Multiply-Subtract of Packed Single-Precision Floating-Point Values
VFMSUB213PS
VFMSUB231PS
VFMSUB132SDFused Multiply-Subtract of Scalar Double-Precision Floating-Point Values
VFMSUB213SD
VFMSUB231SD
VFMSUB132SSFused Multiply-Subtract of Scalar Single-Precision Floating-Point Values
VFMSUB213SS
VFMSUB231SS
VFMSUBADD132PDFused Multiply-Alternating Subtract/Add of Packed Double-Precision Floating-Point Values
VFMSUBADD213PD
VFMSUBADD231PD
VFMSUBADD132PSFused Multiply-Alternating Subtract/Add of Packed Single-Precision Floating-Point Values
VFMSUBADD213PS
VFMSUBADD231PS
VFNMADD132PDFused Negative Multiply-Add of Packed Double-Precision Floating-Point Values
VFNMADD213PD
VFNMADD231PD
VFNMADD132PSFused Negative Multiply-Add of Packed Single-Precision Floating-Point Values
VFNMADD213PS
VFNMADD231PS
VFNMADD132SDFused Negative Multiply-Add of Scalar Double-Precision Floating-Point Values
VFNMADD213SD
VFNMADD231SD
VFNMADD132SSFused Negative Multiply-Add of Scalar Single-Precision Floating-Point Values
VFNMADD213SS
VFNMADD231SS
VFNMSUB132PDFused Negative Multiply-Subtract of Packed Double-Precision Floating-Point Values
VFNMSUB213PD
VFNMSUB231PD
VFNMSUB132PSFused Negative Multiply-Subtract of Packed Single-Precision Floating-Point Values
VFNMSUB213PS
VFNMSUB231PS
VFNMSUB132SDFused Negative Multiply-Subtract of Scalar Double-Precision Floating-Point Values
VFNMSUB213SD
VFNMSUB231SD
VFNMSUB132SSFused Negative Multiply-Subtract of Scalar Single-Precision Floating-Point Values
VFNMSUB213SS
VFNMSUB231SS

FMA4

Supported in AMD processors starting with the Bulldozer architecture. Not supported by any intel chip as of 2017.

Fused multiply-add with four operands. FMA4 was realized in hardware before FMA3.

InstructionOpcodeMeaningNotes
VFMADDPD xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 69 /r /is4Fused Multiply-Add of Packed Double-Precision Floating-Point Values
VFMADDPS xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 68 /r /is4Fused Multiply-Add of Packed Single-Precision Floating-Point Values
VFMADDSD xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 6B /r /is4Fused Multiply-Add of Scalar Double-Precision Floating-Point Values
VFMADDSS xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 6A /r /is4Fused Multiply-Add of Scalar Single-Precision Floating-Point Values
VFMADDSUBPD xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 5D /r /is4Fused Multiply-Alternating Add/Subtract of Packed Double-Precision Floating-Point Values
VFMADDSUBPS xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 5C /r /is4Fused Multiply-Alternating Add/Subtract of Packed Single-Precision Floating-Point Values
VFMSUBADDPD xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 5F /r /is4Fused Multiply-Alternating Subtract/Add of Packed Double-Precision Floating-Point Values
VFMSUBADDPS xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 5E /r /is4Fused Multiply-Alternating Subtract/Add of Packed Single-Precision Floating-Point Values
VFMSUBPD xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 6D /r /is4Fused Multiply-Subtract of Packed Double-Precision Floating-Point Values
VFMSUBPS xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 6C /r /is4Fused Multiply-Subtract of Packed Single-Precision Floating-Point Values
VFMSUBSD xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 6F /r /is4Fused Multiply-Subtract of Scalar Double-Precision Floating-Point Values
VFMSUBSS xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 6E /r /is4Fused Multiply-Subtract of Scalar Single-Precision Floating-Point Values
VFNMADDPD xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 79 /r /is4Fused Negative Multiply-Add of Packed Double-Precision Floating-Point Values
VFNMADDPS xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 78 /r /is4Fused Negative Multiply-Add of Packed Single-Precision Floating-Point Values
VFNMADDSD xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 7B /r /is4Fused Negative Multiply-Add of Scalar Double-Precision Floating-Point Values
VFNMADDSS xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 7A /r /is4Fused Negative Multiply-Add of Scalar Single-Precision Floating-Point Values
VFNMSUBPD xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 7D /r /is4Fused Negative Multiply-Subtract of Packed Double-Precision Floating-Point Values
VFNMSUBPS xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 7C /r /is4Fused Negative Multiply-Subtract of Packed Single-Precision Floating-Point Values
VFNMSUBSD xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 7F /r /is4Fused Negative Multiply-Subtract of Scalar Double-Precision Floating-Point Values
VFNMSUBSS xmm0, xmm1, xmm2, xmm3C4E3 WvvvvL01 7E /r /is4Fused Negative Multiply-Subtract of Scalar Single-Precision Floating-Point Values

AVX

AVX were first supported by Intel with Sandy Bridge and by AMD with Bulldozer.

Vector operations on 256 bit registers.

Instruction Description
VBROADCASTSS Copy a 32-bit, 64-bit or 128-bit memory operand to all elements of a XMM or YMM vector register.
VBROADCASTSD
VBROADCASTF128
VINSERTF128 Replaces either the lower half or the upper half of a 256-bit YMM register with the value of a 128-bit source operand. The other half of the destination is unchanged.
VEXTRACTF128 Extracts either the lower half or the upper half of a 256-bit YMM register and copies the value to a 128-bit destination operand.
VMASKMOVPS Conditionally reads any number of elements from a SIMD vector memory operand into a destination register, leaving the remaining vector elements unread and setting the corresponding elements in the destination register to zero. Alternatively, conditionally writes any number of elements from a SIMD vector register operand to a vector memory operand, leaving the remaining elements of the memory operand unchanged. On the AMD Jaguar processor architecture, this instruction with a memory source operand takes more than 300 clock cycles when the mask is zero, in which case the instruction should do nothing. This appears to be a design flaw.[61]
VMASKMOVPD
VPERMILPS Permute In-Lane. Shuffle the 32-bit or 64-bit vector elements of one input operand. These are in-lane 256-bit instructions, meaning that they operate on all 256 bits with two separate 128-bit shuffles, so they can not shuffle across the 128-bit lanes.[62]
VPERMILPD
VPERM2F128 Shuffle the four 128-bit vector elements of two 256-bit source operands into a 256-bit destination operand, with an immediate constant as selector.
VZEROALL Set all YMM registers to zero and tag them as unused. Used when switching between 128-bit use and 256-bit use.
VZEROUPPER Set the upper half of all YMM registers to zero. Used when switching between 128-bit use and 256-bit use.

AVX2

Introduced in Intel's Haswell microarchitecture and AMD's Excavator.

Expansion of most vector integer SSE and AVX instructions to 256 bits

Instruction Description
VBROADCASTSS Copy a 32-bit or 64-bit register operand to all elements of a XMM or YMM vector register. These are register versions of the same instructions in AVX1. There is no 128-bit version however, but the same effect can be simply achieved using VINSERTF128.
VBROADCASTSD
VPBROADCASTB Copy an 8, 16, 32 or 64-bit integer register or memory operand to all elements of a XMM or YMM vector register.
VPBROADCASTW
VPBROADCASTD
VPBROADCASTQ
VBROADCASTI128 Copy a 128-bit memory operand to all elements of a YMM vector register.
VINSERTI128 Replaces either the lower half or the upper half of a 256-bit YMM register with the value of a 128-bit source operand. The other half of the destination is unchanged.
VEXTRACTI128 Extracts either the lower half or the upper half of a 256-bit YMM register and copies the value to a 128-bit destination operand.
VGATHERDPD Gathers single or double precision floating point values using either 32 or 64-bit indices and scale.
VGATHERQPD
VGATHERDPS
VGATHERQPS
VPGATHERDD Gathers 32 or 64-bit integer values using either 32 or 64-bit indices and scale.
VPGATHERDQ
VPGATHERQD
VPGATHERQQ
VPMASKMOVD Conditionally reads any number of elements from a SIMD vector memory operand into a destination register, leaving the remaining vector elements unread and setting the corresponding elements in the destination register to zero. Alternatively, conditionally writes any number of elements from a SIMD vector register operand to a vector memory operand, leaving the remaining elements of the memory operand unchanged.
VPMASKMOVQ
VPERMPS Shuffle the eight 32-bit vector elements of one 256-bit source operand into a 256-bit destination operand, with a register or memory operand as selector.
VPERMD
VPERMPD Shuffle the four 64-bit vector elements of one 256-bit source operand into a 256-bit destination operand, with a register or memory operand as selector.
VPERMQ
VPERM2I128 Shuffle (two of) the four 128-bit vector elements of two 256-bit source operands into a 256-bit destination operand, with an immediate constant as selector.
VPBLENDD Doubleword immediate version of the PBLEND instructions from SSE4.
VPSLLVD Shift left logical. Allows variable shifts where each element is shifted according to the packed input.
VPSLLVQ
VPSRLVD Shift right logical. Allows variable shifts where each element is shifted according to the packed input.
VPSRLVQ
VPSRAVD Shift right arithmetically. Allows variable shifts where each element is shifted according to the packed input.

AVX-512

Introduced in Intel's Xeon Phi x200

Vector operations on 512 bit registers.

AVX-512 foundation

Instruction Description
VBLENDMPD Blend float64 vectors using opmask control
VBLENDMPS Blend float32 vectors using opmask control
VPBLENDMD Blend int32 vectors using opmask control
VPBLENDMQ Blend int64 vectors using opmask control
VPCMPD Compare signed/unsigned doublewords into mask
VPCMPUD
VPCMPQ Compare signed/unsigned quadwords into mask
VPCMPUQ
VPTESTMD Logical AND and set mask for 32 or 64 bit integers.
VPTESTMQ
VPTESTNMD Logical NAND and set mask for 32 or 64 bit integers.
VPTESTNMQ
VCOMPRESSPD Store sparse packed double/single-precision floating-point values into dense memory
VCOMPRESSPS
VPCOMPRESSD Store sparse packed doubleword/quadword integer values into dense memory/register
VPCOMPRESSQ
VEXPANDPD Load sparse packed double/single-precision floating-point values from dense memory
VEXPANDPS
VPEXPANDD Load sparse packed doubleword/quadword integer values from dense memory/register
VPEXPANDQ
VPERMI2PD Full single/double floating point permute overwriting the index.
VPERMI2PS
VPERMI2D Full doubleword/quadword permute overwriting the index.
VPERMI2Q
VPERMT2PS Full single/double floating point permute overwriting first source.
VPERMT2PD
VPERMT2D Full doubleword/quadword permute overwriting first source.
VPERMT2Q
VSHUFF32x4 Shuffle four packed 128-bit lines.
VSHUFF64x2
VSHUFFI32x4
VSHUFFI64x2
VPTERNLOGD Bitwise Ternary Logic
VPTERNLOGQ
VPMOVQD Down convert quadword or doubleword to doubleword, word or byte; unsaturated, saturated or saturated unsigned. The reverse of the sign/zero extend instructions from SSE4.1.
VPMOVSQD
VPMOVUSQD
VPMOVQW
VPMOVSQW
VPMOVUSQW
VPMOVQB
VPMOVSQB
VPMOVUSQB
VPMOVDW
VPMOVSDW
VPMOVUSDW
VPMOVDB
VPMOVSDB
VPMOVUSDB
VCVTPS2UDQ Convert with or without truncation, packed single or double-precision floating point to packed unsigned doubleword integers.
VCVTPD2UDQ
VCVTTPS2UDQ
VCVTTPD2UDQ
VCVTSS2USI Convert with or without trunction, scalar single or double-precision floating point to unsigned doubleword integer.
VCVTSD2USI
VCVTTSS2USI
VCVTTSD2USI
VCVTUDQ2PS Convert packed unsigned doubleword integers to packed single or double-precision floating point.
VCVTUDQ2PD
VCVTUSI2PS Convert scalar unsigned doubleword integers to single or double-precision floating point.
VCVTUSI2PD
VCVTUSI2SD Convert scalar unsigned integers to single or double-precision floating point.
VCVTUSI2SS
VCVTQQ2PD Convert packed quadword integers to packed single or double-precision floating point.
VCVTQQ2PS
VGETEXPPD Convert exponents of packed fp values into fp values
VGETEXPPS
VGETEXPSD Convert exponent of scalar fp value into fp value
VGETEXPSS
VGETMANTPD Extract vector of normalized mantissas from float32/float64 vector
VGETMANTPS
VGETMANTSD Extract float32/float64 of normalized mantissa from float32/float64 scalar
VGETMANTSS
VFIXUPIMMPD Fix up special packed float32/float64 values
VFIXUPIMMPS
VFIXUPIMMSD Fix up special scalar float32/float64 value
VFIXUPIMMSS
VRCP14PD Compute approximate reciprocals of packed float32/float64 values
VRCP14PS
VRCP14SD Compute approximate reciprocals of scalar float32/float64 value
VRCP14SS
VRNDSCALEPS Round packed float32/float64 values to include a given number of fraction bits
VRNDSCALEPD
VRNDSCALESS Round scalar float32/float64 value to include a given number of fraction bits
VRNDSCALESD
VRSQRT14PD Compute approximate reciprocals of square roots of packed float32/float64 values
VRSQRT14PS
VRSQRT14SD Compute approximate reciprocal of square root of scalar float32/float64 value
VRSQRT14SS
VSCALEFPS Scale packed float32/float64 values with float32/float64 values
VSCALEFPD
VSCALEFSS Scale scalar float32/float64 value with float32/float64 value
VSCALEFSD
VALIGND Align doubleword or quadword vectors
VALIGNQ
VPABSQ Packed absolute value quadword
VPMAXSQ Maximum of packed signed/unsigned quadword
VPMAXUQ
VPMINSQ Minimum of packed signed/unsigned quadword
VPMINUQ
VPROLD Bit rotate left or right
VPROLVD
VPROLQ
VPROLVQ
VPRORD
VPRORVD
VPRORQ
VPRORVQ
VPSCATTERDD Scatter packed doubleword/quadword with signed doubleword and quadword indices
VPSCATTERDQ
VPSCATTERQD
VPSCATTERQQ
VSCATTERDPS Scatter packed float32/float64 with signed doubleword and quadword indices
VSCATTERDPD
VSCATTERQPS
VSCATTERQPD

Cryptographic instructions

Intel AES instructions

6 new instructions.

Instruction Description
AESENC Perform one round of an AES encryption flow
AESENCLAST Perform the last round of an AES encryption flow
AESDEC Perform one round of an AES decryption flow
AESDECLAST Perform the last round of an AES decryption flow
AESKEYGENASSIST Assist in AES round key generation
AESIMC Assist in AES Inverse Mix Columns

RDRAND and RDSEED

Instruction Description
RDRAND Read Random Number
RDSEED Read Random Seed

Intel SHA instructions

7 new instructions.

Instruction Description
SHA1RNDS4 Perform Four Rounds of SHA1 Operation
SHA1NEXTE Calculate SHA1 State Variable E after Four Rounds
SHA1MSG1 Perform an Intermediate Calculation for the Next Four SHA1 Message Dwords
SHA1MSG2 Perform a Final Calculation for the Next Four SHA1 Message Dwords
SHA256RNDS2 Perform Two Rounds of SHA256 Operation
SHA256MSG1 Perform an Intermediate Calculation for the Next Four SHA256 Message Dwords
SHA256MSG2 Perform a Final Calculation for the Next Four SHA256 Message Dwords

VIA PadLock instructions

Instruction Opcode Description
REP MONTMUL F3 0F A6 C0 Perform Montgomery Multiplication
REP XSHA1 F3 0F A6 C8 Compute SHA-1 hash for ECX bytes
REP XSHA256 F3 0F A6 D0 Compute SHA-256 hash for ECX bytes
CCS_HASH[63][64] F3 0F A6 E8 Compute SM3 hash for ECX units (bytes or 64-byte blocks) (Zhaoxin CPUs only)
XSTORE 0F A7 C0 Store Available Random Bytes (0 to 8 bytes)
REP XSTORE F3 0F A7 C0 Store ECX Random Bytes
REP XCRYPTECB F3 0F A7 C8 Encrypt/Decrypt ECX 128-bit blocks, using AES in ECB block mode
REP XCRYPTCBC F3 0F A7 D0 Encrypt/Decrypt ECX 128-bit blocks, using AES in CBC block mode
REP XCRYPTCTR F3 0F A7 D8 Encrypt/Decrypt ECX 128-bit blocks, using AES in CTR block mode
REP XCRYPTCFB F3 0F A7 E0  Encrypt/Decrypt ECX 128-bit blocks, using AES in CFB block mode
REP XCRYPTOFB F3 0F A7 E8 Encrypt/Decrypt ECX 128-bit blocks, using AES in OFB block mode
CCS_ENCRYPT[63][64] F3 0F A7 F0 Encrypt/Decrypt ECX 128-bit blocks, using SM4 encryption (Zhaoxin CPUs only)

Virtualization instructions

AMD-V instructions

InstructionMeaningNotesOpcode
CLGIClear Global Interrupt FlagClears the GIF0x0F 0x01 0xDD
INVLPGAInvalidate TLB entry in a specified ASIDInvalidates the TLB mapping for the virtual page specified in RAX and the ASID specified in ECX.0x0F 0x01 0xDF
SKINITSecure Init and Jump with AttestationVerifiable startup of trusted software based on secure hash comparison0x0F 0x01 0xDE
STGISet Global Interrupt FlagSets the GIF.0x0F 0x01 0xDC
VMLOADLoad state From VMCBLoads a subset of processor state from the VMCB specified by the physical address in the RAX register.0x0F 0x01 0xDA
VMMCALLCall VMMUsed exclusively to communicate with VMM0x0F 0x01 0xD9
VMRUNRun virtual machinePerforms a switch to the guest OS.0x0F 0x01 0xD8
VMSAVESave state To VMCBSaves additional guest state to VMCB.0x0F 0x01 0xDB

Intel VT-x instructions

InstructionMeaningNotesOpcode
INVEPTInvalidate Translations Derived from EPTInvalidates EPT-derived entries in the TLBs and paging-structure caches.0x66 0x0F 0x38 0x80
INVVPIDInvalidate Translations Based on VPIDInvalidates entries in the TLBs and paging-structure caches based on VPID.0x66 0x0F 0x38 0x80
VMFUNCInvoke VM functionInvoke VM function specified in EAX.0x0F 0x01 0xD4
VMPTRLDLoad Pointer to Virtual-Machine Control StructureLoads the current VMCS pointer from memory.0x0F 0xC7/6
VMPTRSTStore Pointer to Virtual-Machine Control StructureStores the current-VMCS pointer into a specified memory address. The operand of this instruction is always 64 bits and is always in memory.0x0F 0xC7/7
VMCLEARClear Virtual-Machine Control StructureWrites any cached data to the VMCS0x66 0x0F 0xC7/6
VMREADRead Field from Virtual-Machine Control StructureReads out a field in the VMCS0x0F 0x78
VMWRITEWrite Field to Virtual-Machine Control StructureModifies a field in the VMCS0x0F 0x79
VMCALLCall to VM MonitorCalls VM Monitor function from Guest System0x0F 0x01 0xC1
VMLAUNCHLaunch Virtual MachineLaunch virtual machine managed by current VMCS0x0F 0x01 0xC2
VMRESUMEResume Virtual MachineResume virtual machine managed by current VMCS0x0F 0x01 0xC3
VMXOFFLeave VMX OperationStops hardware supported virtualisation environment0x0F 0x01 0xC4
VMXONEnter VMX OperationEnters hardware supported virtualisation environment0xF3 0x0F 0xC7/6

Undocumented instructions

Undocumented x86 instructions

The x86 CPUs contain undocumented instructions which are implemented on the chips but not listed in some official documents. They can be found in various sources across the Internet, such as Ralf Brown's Interrupt List and at sandpile.org

Some of these instructions are widely available across many/most x86 CPUs, while others are specific to a narrow range of CPUs.

Undocumented instructions that are widely available across many x86 CPUs include:

Mnemonics Opcodes Description Status
AAM imm8 D4 imm8 ASCII-Adjust-after-Multiply. Convert a binary multiplication result to BCD. Available beginning with 8086, documented since Pentium (earlier documentation lists no arguments)
AAD imm8 D5 imm8 ASCII-Adjust-Before-Division. Convert a BCD value to binary for a following division instruction. Division counterpart of AAM Available beginning with 8086, documented since Pentium (earlier documentation lists no arguments)
SALC,

SETALC

D6 Set AL depending on the value of the Carry Flag (a 1-byte alternative of SBB AL, AL) Available beginning with 8086, but only documented since Pentium Pro.
TEST F6 /1,

F7 /1

Undocumented variants of the TEST instruction.[65] Performs the same operation as the documented F6 /0 and F7 /0 variants, respectively. Available since the 8086 (80186 for the C0..C1 variant of SHL/SAL).

Unavailable on some 80486 steppings.[66][67]

SHL,

SAL

(D0..D3) /6,

(C0..C1) /6

Undocumented variants of the SHL instruction.[65] Performs the same operation as the documented (D0..D3) /4 and (C0..C1) /4 variants, respectively.
 (multiple) 82 /(0..7) imm8 Undocumented alias of opcode 80,[68] which provides variants of 8-bit integer instructions (ADD,OR,ADC,SBB,AND,SUB,XOR,CMP) with an 8-bit immediate argument. Available since the 8086. Explicitly unavailable in 64-bit mode.
REPNZ MOVS,

REPNZ STOS

F2 (A4..A5),

F2 (AA..AB)

The behavior of the F2 prefix (REPNZ, REPNE) when used with string instructions other than CMPS/SCAS is undocumented, but there exists commercial software (e.g. the version of FDISK distributed with MS-DOS versions 3.30 to 6.22[69]) that rely on it to behave in the same way as the documented F3 (REP) prefix. Available since the 8086.
REP RET F3 C3 The use of the REP prefix with the RET instruction is not listed as supported in either the Intel SDM or the AMD APM. However, AMD's optimization guide for the AMD-K8 describes the F3 C3 encoding as a way to encode a two-byte RET instruction - this is the recommended workaround for an issue in the AMD-K8's branch predictor that can cause branch prediction to fail for some 1-byte RET instructions.[70] At least some versions of gcc are known to use this encoding.[71] Executes as RET on all known x86 CPUs.
ICEBP,

INT1

F1 Single byte single-step exception / Invoke ICE Available beginning with 80386, documented (as INT1) since Pentium Pro
NOP r/m 0F 1F /0 Official long NOP.

Introduced in the Pentium Pro in 1995, but remained undocumented until March 2006.[30][72][73]

Available on Pentium Pro and AMD K7[74] and later.

Unavailable on AMD K6, AMD Geode LX, VIA Nehemiah.[75]

NOP r/m 0F 0D /r Reserved-NOP. Introduced in 65nm Pentium 4. Intel documentation lists this opcode as NOP in opcode tables but not instruction listings since June 2005.[76][77] From Broadwell onwards, 0F 0D /1 has been documented as PREFETCHW.

On AMD CPUs, 0F 0D with a memory argument is documented as PREFETCH/PREFETCHW since K6-2 - originally as part of 3dnow!, but has been kept in later AMD CPUs even after the rest of 3dnow! was dropped.

Available on Intel CPUs since 65 nm Pentium 4.

UD1,

UD0

0F B9,

0F FF

Intentionally undefined instructions, but unlike UD2 these instructions were left unpublished until December 2016.[78][79]

Microsoft Windows 95 Setup is known to depend on 0F FF being invalid[80][81] - it is used as a self check to test that its #UD exception handler is working properly.

Other invalid opcodes that are being relied on by commercial software to produce #UD exceptions include FF FF (DIF-2,[82] LaserLok[83]) and C4 C4 ("BOP"[84][85]), however as of January 2022 they are not published as intentionally invalid opcodes.

All of these opcodes produce #UD exceptions on 80186 and later (except on NEC V20/V30, which assign at least 0F FF to the BRKEM instruction.)

Undocumented instructions that appear only in a limited subset of x86 CPUs include:

Mnemonics Opcodes Description Status
SAVEALL,

STOREALL

0F 04 Exact purpose unknown, causes CPU hang (HCF). The only way out is CPU reset.[86]

In some implementations, emulated through BIOS as a halting sequence.[87]

In a forum post at the Vintage Computing Federation, this instruction is explained as SAVEALL. It interacts with ICE mode.

Only available on 80286
LOADALL 0F 05 Loads All Registers from Memory Address 0x000800H Only available on 80286.

Opcode reused for SYSCALL in AMD K6-2 and later CPUs.

LOADALLD 0F 07 Loads All Registers from Memory Address ES:EDI Only available on 80386.

Opcode reused for SYSRET in AMD K6-2 and later CPUs.

CL1INVMB 0F 0A[88] On the Intel SCC (Single-chip Cloud Computer), invalidate all message buffers. The menmonic and operation of the instruction, but not its opcode, are described in Intel's SCC architecture specification.[89] Available on the SCC only.
PATCH2 0F 0E On AMD K6 and later maps to FEMMS operation (fast clear of MMX state) but on Intel identified as uarch data read on Intel[90] Only available in Red unlock state (0F 0F too)
PATCH3 0F 0F Write uarch Can change RAM part of microcode on Intel
UMOV r,r/m

UMOV r/m,r

0F (10..13) /r Moves data to/from user memory when operating in ICE HALT mode.[91] Acts as regular MOV otherwise. Available on some 386 and 486 processors only.

Opcodes reused for SSE instructions in later CPUs.

SCALL r/m 0F 18 /0 SuperState Call.[92] Available on Chips and Technologies Super386 CPUs only.
NXOP 0F 55 NexGen hypercode interface.[93] Available on NexGen Nx586 only.
(multiple) 0F (E0..FB)[94] NexGen Nx586 "hyper mode" instructions.

The NexGen Nx586 CPU uses "hyper code"[95] (x86 code sequences unpacked at boot time and only accessible in a special "hyper mode" operation mode, similar to DEC Alpha's PALcode) for many complicated operations that are implemented with microcode in most other x86 CPUs. The Nx586 provides a large number of undocumented instructions to assist hyper mode operation.

Available in Nx586 hyper mode only.
PSWAPW mm,mm/m64 0F 0F /r BB Undocumented AMD 3DNow! instruction on K6-2 and K6-3. Swaps 16-bit words within 64-bit MMX register.[96][59]

Instruction known to be recognized by MASM 6.13 and 6.14.

Available on K6-2 and K6-3 only.

Opcode reused for documented PSWAPD instruction from AMD K7 onwards.

Unknown mnemonic 64 D6 Using the 64h (FS: segment) prefix with the undocumented D6 (SALC/SETALC) instruction will, on UMC CPUs only, cause EAX to be set to 0xAB6B1B07.[53][97] Available on the UMC Green CPU only. Executes as SALC on non-UMC CPUs.
FS: Jcc 64 (70..7F) rel8,

64 0F (80..8F) rel16/32

On Intel "NetBurst" (Pentium 4) CPUs, the 64h (FS: segment) instruction prefix will, when used with conditional branch instructions, act as a branch hint to indicate that the branch will be alternating between taken and not-taken.[98] Unlike other NetBurst branch hints (CS: and DS: segment prefixes), this hint is not documented. Available on NetBurst CPUs only.

Segment prefixes on conditional branches are accepted but ignored by non-NetBurst CPUs.

ALTINST 0F 3F Jump and execute instructions in the undocumented Alternate Instruction Set. Only available on some x86 processors made by VIA Technologies.
(FMA4) VEX.66.0F38 (5c..5f,68..6f,78..7f) /r imm8 On AMD Zen1, FMA4 instructions are present but undocumented (missing CPUID flag). The reason for leaving the feature undocumented may or may not have been due to a buggy implementation.[99] Removed from Zen2 onwards.
REP XSHA512 F3 0F A6 E0 Perform SHA-512 hashing.

Supported by OpenSSL [100] as part of its VIA PadLock support, but not documented by the VIA PadLock Programming Guide.

Only available on some x86 processors made by VIA Technologies and Zhaoxin.
REP XMODEXP F3 0F A6 F8 Instructions to perform modular exponentiation and random number generation, respectively.

Listed in a VIA-supplied patch to add support for VIA Nano-specific PadLock instructions to OpenSSL,[101] but not documented by the VIA PadLock Programming Guide.

XRNG2 F3 0F A7 F8
Unknown mnemonic 0F A7 (C1..C7) Detected by CPU fuzzing tools such as SandSifter[102] and UISFuzz[103] as executing without causing #UD on several different VIA and Zhaoxin CPUs.

Unknown operation, may be related to the documented XSTORE (0F A7 C0) instruction.

(unknown, multiple) 0F 0F /r ?? The whitepapers for SandSifter[102] and UISFuzz[103] report the detection of large numbers of undocumented instructions in the 3DNow! opcode range on several different AMD CPUs (at least Geode NX and C-50). Their operation is not known.

On at least AMD K6-2, all of the unassigned 3dnow! opcodes (other than the undocumented PF2IW, PI2FW and PSWAPW instructions) execute as equivalents of POR (MMX bitwise-OR instruction).[59]

Present on some AMD CPUs with 3DNow!.
MONTMUL2 unknown Zhaoxin RSA/"xmodx" instructions. Mnemonics and CPUID flags are listed in a Linux kernel patch for OpenEuler,[104] but opcodes and instruction descriptions are not available. Unknown. Some Zhaoxin CPUs[105] have the CPUID flags for these instructions set.

Undocumented x87 instructions

Mnemonics Opcodes Description Status
FFREEP DF C0+i Same operation as FFREE st(i) followed by FSTP st(0). Available on all Intel x87 FPUs from 8087 onwards.

Available on most AMD x87 FPUs. Unavailable on AMD Geode GX/LX, DM&P Vortex86[106] and NexGen 586PF.[107]

Documented for the Intel 80287[108] but then omitted from later manuals until the October 2017 update of the Intel SDM.[109]

FSTPNCE D9 D8+i Same operation as documented FSTP st(i), DD D8+i, except that it won't produce a stack underflow exception.
FCOM DC D0+i Same operation as documented FCOM st(i), D8 D0+i
FCOMP DC D8+i,

DE D0+i

Same operation as documented FCOMP st(i), D8 D8+i
FXCH DD C8+i,

DF C8+i

Same operation as documented FXCH st(i), D9 C8+i
FSTP DF D0+i,

DF D8+i

Same operation as documented FSTP st(i), DD D8+i
FENI,

FENI8087_NOP

DB E0 FPU Enable Interrupts (8087) Documented for the Intel 80287.[108]

Present on all Intel x87 FPUs from 80287 onwards. For FPUs other than the ones where they were introduced on (8087 for FENI/FDISI and 80287 for FSETPM), they act as NOPs.

These instructions and their operation on modern CPUs are commonly mentioned in later Intel documentation, but with opcodes omitted and opcode table entries left blank (e.g. Intel SDM 325462-076, december 2021 mentions them twice without opcodes).

The opcodes are, however, recognized by Intel XED.[110]

FDISI,

FDISI8087_NOP

DB E1 FPU Disable Interrupts (8087)
FSETPM,

FSETPM287_NOP

DB E4 FPU Set Protected Mode (80287)
(no mnemonic) D9 D7,  D9 E2,
D9 E7,  DD FC,
DE D8,  DE DA,
DE DC,  DE DD,
DE DE,  DF FC
"Reserved by Cyrix" opcodes These opcodes are listed as reserved opcodes that will produce "unpredictable results" without generating exceptions on at least Cyrix 6x86,[111] 6x86MX, MII, MediaGX, and AMD Geode GX/LX.[112] (The documentation for these CPUs all list the same ten opcodes.)

Their actual operation is not known, nor is it known whether their operation is the same on all of these CPUs.

See also

References

  1. "Re: Intel Processor Identification and the CPUID Instruction". Retrieved 2013-04-21.
  2. NEC 16-bit V-series User's Manual
  3. NEC V30MZ Preliminary User's Manual, p.14
  4. NEC 72291 FPU: an instruction listing can be found in the HP 64873 V-series Cross Assembler Reference, pages F-31 to F-34.
  5. NEC 16-bit V-series Microprocessor Data Book, 1991, p. 360-361
  6. Renesas Data Sheet MOS Integrated Circuit uPD70320
  7. NEC V55PI 16-bit microprocessor Data Sheet, U11775E
  8. NEC 16-bit V-series Microprocessor Data Book, 1991, p. 765-766
  9. NEC V55PI Users Manual Instruction, U10231J (Japanese). Opcodes for PUSH/POP DS2/DS3 listed in macro definitions on p. 378.
  10. NEC V55SC 16-bit Microprocessor Preliminary Data Sheet (O.D.No ID-8206A, March 1993), p.127. Located on Apr 20, 2022 by searching for "nec v55sc" at datasheetarchive.com.
  11. NEC uPD70616 Programmer's Reference Manual (november 1986), p.287
  12. Andrew Schulman, "Unauthorized Windows 95" (ISBN 1-56884-169-8), chapter 8, p.249,257.
  13. US Patent 4974159, "Method of transferring control in a multitasking computer system" mentions 63h/ARPL.
  14. WikiChip, UMIP - x86
  15. Oracle Corp, Oracle® VM VirtualBox Administrator's Guide for Release 6.0, section 3.5: Details About Software Virtualization
  16. MBC Project,Virtual Machine Dectection
  17. Michal Necasek, SGDT/SIDT Fiction and Reality
  18. Intel, How Microarchitectural Data Sampling works, see mitigations section. Archived on Apr 22,2022
  19. Linux kernel documentation, Microarchitectural Data Sampling (MDS) mitigation
  20. sandpile.org, x86 architecture rFLAGS register, see note #7
  21. "Intel 80386 CPU Information | PCJS Machines".
  22. Geoff Chappell, CPU Identification before CPUID
  23. Toth, Ervin (1998-03-16). "BSWAP with 16-bit registers". Archived from the original on 1999-11-03. The instruction brings down the upper word of the doubleword register without affecting its upper 16 bits.
  24. Coldwin, Gynvael (2009-12-29). "BSWAP + 66h prefix". Retrieved 2018-10-03. internal (zero-)extending the value of a smaller (16-bit) register … applying the bswap to a 32-bit value "00 00 AH AL", … truncated to lower 16-bits, which are "00 00". … Bochs … bswap reg16 acts just like the bswap reg32 … QEMU … ignores the 66h prefix
  25. Intel "i486 Microprocessor" (april 1989, order no. 240440-001) p.142 lists CMPXCHG with 0F A6/A7 encodings.
  26. "Intel 486 & 486 POD CPUID, S-spec, & Steppings".
  27. Intel "i486 Microprocessor" (november 1989, order no. 240440-002) p.135 lists CMPXCHG with 0F B0/B1 encodings.
  28. "RSM—Resume from System Management Mode". Archived from the original on 2012-03-12.{{cite web}}: CS1 maint: bot: original URL status unknown (link)
  29. Cyrix 486SLC/e Data Sheet (1992), section 2.6.4
  30. Intel Community: Multibyte NOP Made Official
  31. Intel Software Developers Manual, vol 3B (order no 253669-076us, december 2021), section 22.15 "Reserved NOP"
  32. Michal Necasek, "SYSENTER, Where Are You?"
  33. Intel Itanium Architecture Software Developer's Manual, volume 4, (document number: 323208, revision 2.3, may 2010).
  34. ZFMicro, ZFx86 System-on-a-chip Data Book 1.0 Rev D, june 5, 2005, section 2.2.6.3, page 76
  35. Texas Instruments, TI486 Microprocessor Reference Guide, 1993, section A.14, page 308
  36. Debbie Wiles, CPU identification, archived on 2004-06-04
  37. Cyrix 6x86MX Data Book, section 2.15.3
  38. Cyrix MediaGX Data Book, section 4.1.5
  39. AMD Geode LX Processors Data Book, section 8.3.4
  40. DM&P, M6117D : System on a chip, pages 31,34,68. Archived on Jul 20,2006.
  41. Intel 64 and IA-32 Architectures Optimization Reference Manual, section 7.3.2
  42. Intel 64 and IA-32 Architectures Software Developer’s Manual, section 4.3, subsection "PREFETCHh—Prefetch Data Into Caches"
  43. Hollingsworth, Brent. "New "Bulldozer" and "Piledriver" instructions" (PDF). Advanced Micro Devices, Inc. Retrieved 11 December 2014.
  44. "Family 16h AMD A-Series Data Sheet" (PDF). amd.com. AMD. October 2013. Retrieved 2014-01-02.
  45. "AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and System Instructions" (PDF). amd.com. AMD. October 2013. Retrieved 2014-01-02.
  46. "tbmintrin.h from GCC 4.8". Retrieved 2014-03-17.
  47. Intel, Control-flow Enforcement Technology Specification (v3.0, order no. 334525-003, march 2019)
  48. Intel SDM, rev 076, december 2021, volume 1, section 18.3.1
  49. Binutils mailing list: x86: CET v2.0: Update NOTRACK prefix
  50. Bruce Dawson, Intel Underestimates Error Bounds by 1.3 quintillion
  51. Intel SDM, rev 053 and later, describes the exact argument reduction procedure used for FSIN, FCOS, FSINCOS and FPTAN in volume 1, section 8.3.8
  52. Intel "Intel287 XL/XLT Math Coprocessor", (oct 1992, order no 290376-003) p.33
  53. Potemkin's Hacker Group's OPCODE.LST, v4.51
  54. Intel "Intel387 SL Mobile Math Coprocessor" (feb 1992, order no 290427-001), appendix A. Located on Jan 7, 2022 by searching for "intel387 sl" at datasheetarchive.com.
  55. IIT 3c87 Advanced Math CoProcessor Data Book
  56. Harald Feldmann, Hamarsoft 86BUGS List
  57. Norbert Juffa "Everything You Always Wanted To Know About Math Coprocessors", 01-oct-94 revision
  58. "Windows 10 64-bit requirements: Does my CPU support CMPXCHG16b, PrefetchW and LAHF/SAHF?".
  59. "Archived copy". grafi.ii.pw.edu.pl. Archived from the original on 30 January 2003. Retrieved 22 February 2022.{{cite web}}: CS1 maint: archived copy as title (link)
  60. https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf section 3.5.2.3
  61. "The microarchitecture of Intel, AMD and VIA CPUs: An optimization guide for assembly programmers and compiler makers" (PDF). Retrieved October 17, 2016.
  62. "Chess programming AVX2". Retrieved October 17, 2016.
  63. https://www.zhaoxin.com/prodshowd_483.html
  64. https://github.com/ZXOpenSource/OpenSSL-ZX-GMI/blob/master/GMI%20User%20Manual%20V1.0.pdf
  65. Frank van Gilluwe, "The Undocumented PC - Second Edition", p. 93-95
  66. Michal Necasek, Intel 486 Errata?
  67. Robert Hummel, "PC Magazine Programmer's Technical Reference" (ISBN 1-56276-016-5) p.728
  68. "Asm, opcode 82h".
  69. Daniel B. Sedory, An Examination of the Standard MBR
  70. AMD, Software Optimization Guide for AMD64 Processors (publication 25112, revision 3.06, sep 2005), section 6.2, p.128
  71. Bug 48227 - "rep ret" generated for -march=core2
  72. Intel Software Developers Manual, volume 2B (jan 2006, order no 235667-018, does not have long NOP)
  73. Intel Software Developers Manual, volume 2B (march 2006, order no 235667-019, has long NOP)
  74. Agner Fog, Instruction Tables, AMD K7 section.
  75. "579838 – glibc not compatible with AMD Geode LX".
  76. Intel Software Developers Manual, volume 2B (april 2005, order no 235667-015, does not list 0F0D-nop)
  77. Intel Software Developers Manual, volume 2B (june 2005, order no 235667-016, lists 0F0D-nop in opcode table but not under NOP instruction description.)
  78. Intel Software Developers Manual, volume 2B (order no. 253667-060, september 2016) does not list UD0 and UD1.
  79. Intel Software Developers Manual, volume 2B (order no. 253667-061, december 2016) lists UD0 and UD1.
  80. "PCJS Machines". GitHub. 17 April 2022.
  81. "80486 paging protection faults? \ VOGONS".
  82. "Invalid opcode handling \ VOGONS".
  83. "Invalid instructions cause exit even if Int 6 is hooked \ VOGONS".
  84. "Ragestorm - Programming World".
  85. "Accessing Windows device drivers from DOS programs".
  86. "Re: Undocumented opcodes (HINT_NOP)". Archived from the original on 2004-11-06. Retrieved 2010-11-07.
  87. "Re: Also some undocumented 0Fh opcodes". Archived from the original on 2003-06-26. Retrieved 2010-11-07.
  88. Intel's RCCE library for the SCC uses opcode 0F 0A for SCC's message invalidation instruction.
  89. Intel Labs, SCC External Architecture Specification (EAS), Revision 0.94, p.29
  90. "Undocumented x86 instructions to control the CPU at the microarchitecture level in modern Intel processors" (PDF). 9 July 2021.{{cite web}}: CS1 maint: url-status (link)
  91. Robert R. Collins, Undocumented OpCodes: UMOV
  92. Michal Necasek, More on the C&T Super386
  93. Herbert Oppmann, NXOP (Opcode 0Fh 55h)
  94. Herbert Oppmann, NexGen Nx586 Hypercode Source, see COMMON.INC
  95. Herbert Oppmann, Inside the NexGen Nx586 System BIOS
  96. Grzegorz Mazur, AMD 3DNow! undocumented instructions
  97. "[UCA CPU Analysis] Prototype UMC Green CPU U5S-SUPER33". 25 May 2020.
  98. Agner Fog, The Microarchitecture of Intel, AMD and VIA CPUs, section 3.4 "Branch Prediction in P4 and P4E".
  99. Reddit /r/Amd discussion thread: Ryzen has undocumented support for FMA4
  100. "Welcome to the OpenSSL Project". GitHub. 21 April 2022.
  101. PATCH: Update PadLock engine for VIA C7 and Nano CPUs
  102. Christopher Domas, Breaking the x86 ISA
  103. Xixing Li et al, UISFuzz: An Efficient Fuzzing Method for CPU Undocumented Instruction Searching
  104. https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/thread/W6GXBRRO6OKNHVJ3WDDUXSLQGI2GFU4X/
  105. CPUID dump for Zhaoxin KaiXian-U6870, see C0000001 line
  106. "37179 – GCC emits bad opcode 'ffreep'".
  107. https://www.pagetable.com/?p=16
  108. Intel 80286 and 80287 Programmers Reference Manual, 1987 , p. 485
  109. Intel Software Developer's Manual, revision 064, volume 3B, section 22.18.9
  110. https://github.com/intelxed/xed/blob/main/datafiles/xed-isa.txt#L916
  111. Cyrix 6x86 processor data book, page 6-34
  112. AMD Geode LX Processors Data Book, publication 33234H, p.670
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.