The instructions and corresponding mnemonics in the table below are grouped by function categories.
If an instruction supports multiple data types-byte (B), word (W), doubleword (DW), or quadword (QW), the datatypes are listed in brackets. Only one data type may be chosen for a given instruction. For example, the base mnemonic PADD (packed add) has the following variations: PADDB, PADDW, and PADDD. The number of opcodes associated with each base mnemonic is listed.
Different Opcodes | |||
Arithmetic | PADD[B,W,D] | Add with wrap-around on [byte, word, doubleword] | |
PADDS[B,W] | Add signed with saturation on [byte, word] | ||
PADDUS[B,W] | Add unsigned with saturation on [byte, word] | ||
PSUB[B,W,D] | Subtract with wrap-around on [byte, word, doubleword] | ||
PSUBS[B,W] | Subtract signed with saturation on [byte, word] | ||
PSUBUS[B,W] | Subtract unsigned with saturation on [byte, word] | ||
PMULHW | Packed multiply high on words | ||
PMULLW | Packed multiply low on words | ||
PMADDWD | Packed multiply on words and add resulting pairs | ||
Comparison | PCMPEQ[B,W,D] | Packed compare for equality [byte, word,doubleword] | |
PCMPGT[B,W,D] | Packed compare greater than [byte, word, doubleword] | ||
Conversion | PACKUSWB | Pack words into bytes (unsigned with saturation) | |
PACKSS[WB,DW] | Pack [words into bytes, doublewords into words] (signed with saturation) | ||
PUNPCKH [BW,WD,DQ] | Unpack (interleave) high-order [bytes, words, doublewords] from MMXTM register | ||
PUNPCKL [BW,WD,DQ] | Unpack (interleave) low-order [bytes, words, doublewords] from MMX register | ||
Logical | PAND | Bitwise AND | |
PANDN | Bitwise AND NOT | ||
POR | Bitwise OR | ||
PXOR | Bitwise XOR | ||
Shift | PSLL[W,D,Q] | Packed shift left logical [word, doubleword, quadword] by amount specified in MMX register or by immediate value | |
PSRL[W,D,Q] | Packed shift right logical [word, doubleword, quadword] by amount specified in MMX register or by immediate value | ||
PSRA[W,D] | Packed shift right arithmetic [word, doubleword] by amount specified in MMX register or by immediate value | ||
Data Transfer | MOV[D,Q] | Move [doubleword, quadword] to MMX register or from MMX register | |
FP & MMX State Mgmt | EMMS | Empty MMX state |