APPENDIX B
IA MMX INSTRUCTION FORMATS AND ENCODINGS
All MMX instructions, except the EMMS instruction, use the same format similar as the two-byte Intel Architecture integer operations. Details of subfield encodings within these formats are presented below.
| |
| |
NOTE:
For register-to-register operations, the decoding of integer
registers is independent of processor mode. For register-to-memory
operations, the effective address is calculated based on the processor
mode in effect.
| |
For more details, see Table 25-2, Table 25-3, and Appendix F of the Pentium® Processor Family Developer's Manual.
For each MMX instruction, Table B4 lists
instruction encodings and the datatypes supported-byte (B), word
(W), doubleword (DW), and quadword (QW).
= output | |
= input | |
= signed saturation | |
= unsigned saturation | |
= not applicable | |
| |||||
EMMS - Empty MMX state | 0000 1111:01110111 | ||||
MOVD - Move doubleword | |||||
reg to mmxreg | 0000 1111:01101110: 11 mmxreg reg | ||||
reg from mmxreg | 0000 1111:01111110: 11 mmxreg reg | ||||
mem to mmxreg | 0000 1111:01101110: mod mmxreg r/m | ||||
mem from mmxreg | 0000 1111:01111110: mod mmxreg r/m | ||||
MOVQ - Move quadword | |||||
mmxreg2 to mmxreg1 | 0000 1111:01101111: 11 mmxreg1 mmxreg2 | ||||
mmxreg2 from mmxreg1 | 0000 1111:01111111: 11 mmxreg1 mmxreg2 | ||||
mem to mmxreg | 0000 1111:01101111: mod mmxreg r/m | ||||
mem from mmxreg | 0000 1111:01111111: mod mmxreg r/m |
PACKSSDW1 - Pack dword to word data (signed with saturation) | |||||
mmxreg2 to mmxreg1 | 0000 1111:01101011: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:01101011: mod mmxreg r/m | ||||
PACKSSWB1 - Pack word to byte data (signed with saturation) | |||||
mmxreg2 to mmxreg1 | 0000 1111:01100011: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:01100011: mod mmxreg r/m | ||||
PACKUSWB1 - Pack word to byte data (unsigned with saturation) | |||||
mmxreg2 to mmxreg1 | 0000 1111:01100111: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:01100111: mod mmxreg r/m | ||||
PADD - Add with wrap-around | |||||
mmxreg2 to mmxreg1 | 0000 1111: 111111gg: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111: 111111gg: mod mmxreg r/m |
PADDS - Add signed with saturation | |||||
mmxreg2 to mmxreg1 | 0000 1111: 111011gg: 11 mmxreg1 mmxreg2 | ||||
memory to reg | 0000 1111: 111011gg: mod reg r/m | ||||
PADDUS - Add unsigned with saturation | |||||
mmxreg2 to mmxreg1 | 0000 1111: 110111gg: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111: 110111gg: mod mmxreg r/m | ||||
PAND - Bitwise And | |||||
mmxreg2 to mmxreg1 | 0000 1111:11011011: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:11011011: mod mmxreg r/m | ||||
PANDN - Bitwise AndNot | |||||
mmxreg2 to mmxreg1 | 0000 1111:11011111: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:11011111: mod mmxreg r/m | ||||
PCMPEQ - Packed compare for equality | |||||
mmxreg2 with mmxreg1 | 0000 1111:011101gg: 11 mmxreg1 mmxreg2 | ||||
memory with mmxreg | 0000 1111:011101gg: mod mmxreg r/m |
PCMPGT - Packed compare greater (signed) | |||||
mmxreg2 with mmxreg1 | 0000 1111:011001gg: 11 mmxreg1 mmxreg2 | ||||
memory with mmxreg | 0000 1111:011001gg: mod mmxreg r/m | ||||
PMADD - Packed multiply add | |||||
mmxreg2 to mmxreg1 | 0000 1111:11110101: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:11110101: mod mmxreg r/m | ||||
PMULH - Packed multiplication | |||||
mmxreg2 to mmxreg1 | 0000 1111:11100101: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:11100101: mod mmxreg r/m | ||||
PMULL - Packed multiplication | |||||
mmxreg2 to mmxreg1 | 0000 1111:11010101: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:11010101: mod mmxreg r/m | ||||
POR - Bitwise Or | |||||
mmxreg2 to mmxreg1 | 0000 1111:11101011: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:11101011: mod mmxreg r/m |
PSLL2 - Packed shift left logical | |||||
mmxreg2 by mmxreg1 | 0000 1111:111100gg: 11 mmxreg1 mmxreg2 | ||||
mmxreg by memory | 0000 1111:111100gg: 11 mmxreg r/m | ||||
mmxreg by immediate | 0000 1111:011100gg: 11 110 mmxreg: imm8 data | ||||
PSRA2 - Packed shift right arithmetic | |||||
mmxreg2 by mmxreg1 | 0000 1111:111000gg: 11 mmxreg1 mmxreg2 | ||||
mmxreg by memory | 0000 1111:111000gg: 11 mmxreg r/m | ||||
mmxreg by immediate | 0000 1111:011100gg: 11 100 mmxreg: imm8 data | ||||
PSRL2 - Packed shift right logical | |||||
mmxreg2 by mmxreg1 | 0000 1111:110100gg: 11 mmxreg1 mmxreg2 | ||||
mmxreg by memory | 0000 1111:110100gg: 11 mmxreg r/m | ||||
mmxreg by immediate | 0000 1111:011100gg: 11 010 mmxreg: imm8 data | ||||
PSUB - Subtract with wrap-around | |||||
mmxreg2 to mmxreg1 | 0000 1111:111110gg: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:111110gg: mod mmxreg r/m |
PSUBS - Subtract signed with saturation | |||||
mmxreg2 to mmxreg1 | 0000 1111:111010gg: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:111010gg: mod mmxreg r/m | ||||
PSUBUS - Subtract unsigned with saturation | |||||
mmxreg2 to mmxreg1 | 0000 1111:110110gg: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:110110gg: mod mmxreg r/m | ||||
PUNPCKH - Unpack high data to next larger type | |||||
mmxreg2 to mmxreg1 | 0000 1111:011010gg: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:011010gg: mod mmxreg r/m | ||||
PUNPCKL - Unpack low data to next larger type | |||||
mmxreg2 to mmxreg1 | 0000 1111:011000gg: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:011000gg: mod mmxreg r/m |
PXOR - Bitwise Xor | |||||
mmxreg2 to mmxreg1 | 0000 1111:11101111: 11 mmxreg1 mmxreg2 | ||||
memory to mmxreg | 0000 1111:11101111: mod mmxreg r/m |
NOTE:
1. The PACK instructions perform saturation from signed packed data of one type to signed or unsigned data of the next smaller type.
2. The format of shift instructions has one additional
format to support shifting by immediate shift-counts. The shift
operations are not supported equally for all data types.
Legal Stuff © 1997 Intel Corporation