MMX instruction set summary (P55C and Klamath)
The table below contains a summary of the MMX instruction set. The
instruction mnemonics below are the base set of mnemonics; most
instructions have multiple variations (e.g., packed-byte, -word, and
-dword variations).
Complete information on the MMX instructions may be found in the
Intel Architecture MMX (tm) Technology Programmer's Reference Manual.
Packed Arithmetic Wrap Around Signed Sat Unsigned Sat
Addition PADD PADDS PADDUS
Subtraction PSUB PSUBS PSUBUS
Multiplication PMULL/H
Multiply & add PMADD
Shift right Arithmetic PSRA
Compare PCMPcc
Conversions Regular Signed Sat Unsigned Sat
Pack PACKSS PACKUS
Unpack PUNPCKL/H
Logical Operations Packed Full 64-bit
And PAND
And not PANDN
Or POR
Exclusive or PXOR
Shift left PSLL PSLL
Shift right PSRL PSRL
Transfers and Memory
Operations 32-bit 64-bit
Register-register move MOVD MOVQ
Load from memory MOVD MOVQ
Store to memory MOVD MOVQ
Miscellaneous
Empty MMX state EMMS
The following functions are used in the algorithmic descriptions
ZeroExtend (value)
returns a value zero-extended to the operand-
size attribute of the instruction. For example,
if OperandSize = 32, ZeroExtend of a byte value
of -10 converts the byte from 0F6h to doubleword
with hexadecimal value 000000F6h. If the value
passed to ZeroExtend and the operand-size
attribute are the same size, ZeroExtend returns
the value unaltered.
SignExtend (value)
returns a value sign-extended to the operand-size
attribute of the instruction. For example, if
OperandSize = 32, SignExtend of a byte containing
the value -10 converts the byte from 0F6h to
doubleword with hexadecimal value 0FFFFFFF6h. If
the value passed to SignExtend and the operand-
size attribute are the same size, SignExtend
returns the value unaltered.
SaturateSignedWordToSignedByte
converts a signed 16-bit value to a signed 8-bit
value. If the signed 16-bit value is less than
-128, it is represented by the saturated value
-128 (80h). If it is greater than 127, it is
represented by the saturated value 127 (7Fh).
SaturateSignedDwordToSignedWord
converts a signed 32-bit value to a signed
16-bit value. If the signed 32-bit value is less
than -32768, it is represented by the saturated
value -32768 (8000h). If it is greater than
32767, it is represented by the saturated value
32767 (7FFFh).
SaturateSignedWordToUnsignedByte
converts a signed 16-bit value to an unsigned
8¡bit value. If the signed 16-bit value is less
than zero it is represented by the saturated
value zero (00h). If it is greater than 255
it is represented by the saturated value 255
(0FFh).
SaturateToSignedByte
represents the result of an operation as a signed
8-bit value. If the result is less than -128, it
is represented by the saturated value -128 (80h).
If it is greater than 127, it is represented by
the saturated value 127 (7Fh).
SaturateToSignedWord
represents the result of an operation as a signed
16-bit value. If the result is less than -32768,
it is represented by the saturated value -32768
(8000h). If it is greater than 32767, it is
represented by the saturated value 32767 (7FFFh).
SaturateToUnsignedByte
represents the result of an operation as a signed
8-bit value. If the result is less than zero it
is represented by the saturated value zero (00h).
If it is greater than 255, it is represented by
the saturated value 255 (0FFh).
SaturateToUnsignedWord
represents the result of an operation as a signed
16-bit value. If the result is less than zero it
is represented by the saturated value zero (00h).
If it is greater than 65535, it is represented
by the saturated value 65535 (0FFFFh).