In 1997, the Pentium MMX systems should be widely available. MMX stands for MultiMedia Extensions. A Pentium MMX chip is a regular Pentium with about 25 new instructions (more if you count all the size, direction, and other permutations) tailored to multimedia integer operations, such as adding, multiplying, and shifting repetitively across large buffers. MMX speeds up operations by processing multiple data elements in parallel. With one 8-byte MMX register, you can operate on eight bytes, four words, two dwords, or the new 64-bit qword. Note that the individual data elements do not interfere with each other. For example, if you have loaded four words into register mm0 and then perform a psllw (Packed Shift Left Logical), word 1 will not shift its leftmost bits into word 2. Some of the MMX instructions combine multiple operations into one, such as multiplying then adding, and these can be quite confusing until you've worked with them a bit. But it's like learning reverse polish notation once you get used to it, you can't imagine life without it. (Better yet, MMX provides you the visual excitement and intrigue of instructions like punpckldq, psubb, and pmaddwd.)
MMX works by aliasing the eight floating-point (FP) registers. Physically they are the same eight registers, but they are used in two different contexts. At any given time, you can use the FP registers for multimedia integer operations, or you can use them for FP operations. You cannot interleave MMX with FP instructions readily, as the MMX instructions make use of the register tags in a way that will confuse the FP instructions. You must call the emms (Empty MultiMedia State) instruction after using MMX instructions and before switching to floating-point instructions. You don't need to worry when transitioning from floating-point to MMX, however.
A key difference between MMX and FP is that the FP registers act as a stack. All floating-point operations involve the item on the top of the stack. For the MMX instructions, however, you can perform operations on any two registers at random, and you do not need to worry about overflowing the stack. Note that MMX instructions operate on integer data, not FP data. o