MMX (instruction set)

From HandWiki
Revision as of 17:22, 6 February 2024 by Jport (talk | contribs) (linkage)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Instruction set designed by Intel


Pentium with MMX

MMX is a single instruction, multiple data (SIMD) instruction set architecture designed by Intel, introduced on January 8, 1997[1][2] with its Pentium P5 (microarchitecture) based line of microprocessors, named "Pentium with MMX Technology".[3] It developed out of a similar unit introduced on the Intel i860,[4] and earlier the Intel i750 video pixel processor. MMX is a processor supplementary capability that is supported on IA-32 processors by Intel and other vendors (As of 1997).

The New York Times described the initial push, including Super Bowl advertisements, as focused on "a new generation of glitzy multimedia products, including videophones and 3-D video games."[5]

MMX has subsequently been extended by several programs by Intel and others: 3DNow!, Streaming SIMD Extensions (SSE), and ongoing revisions of Advanced Vector Extensions (AVX).

Overview

Naming

MMX is officially a meaningless initialism[6] trademarked by Intel;[7] unofficially, the initials have been variously explained as standing for

  • MultiMedia eXtension,[1]
  • Multiple Math eXtension, or
  • Matrix Math eXtension.

Advanced Micro Devices (AMD), during one of its many court battles with Intel, produced marketing material from Intel indicating that MMX stood for "Matrix Math Extensions".[citation needed] Since an initialism cannot be trademarked,[citation needed] this was an attempt to invalidate Intel's trademark. In 1995, Intel filed suit against AMD and Cyrix Corp. for misuse of its trademark MMX. AMD and Intel settled, with AMD acknowledging MMX as a trademark owned by Intel, and with Intel granting AMD rights to use the MMX trademark as a technology name, but not a processor name.[8]

Technical details

Pentium II processor with MMX technology

MMX defines eight processor registers, named MM0 through MM7, and operations that operate on them. Each register is 64 bits wide and can be used to hold either 64-bit integers, or multiple smaller integers in a "packed" format: one instruction can then be applied to two 32-bit integers, four 16-bit integers, or eight 8-bit integers at once.[9]

MMX provides only integer operations. When originally developed, for the Intel i860, the use of integer math made sense (both 2D and 3D calculations required it), but as graphics cards that did much of this became common, integer SIMD in the CPU became somewhat redundant for graphical applications.[citation needed] Alternatively, the saturation arithmetic operations in MMX could[vague] significantly speed up some digital signal processing applications.[citation needed]

To avoid compatibility problems with the context switch mechanisms in existing operating systems, the MMX registers are aliases for the existing x87 floating-point unit (FPU) registers, which context switches would already save and restore. Unlike the x87 registers, which behave like a stack, the MMX registers are each directly addressable (random access).

Any operation involving the floating-point stack might also affect the MMX registers and vice versa, so this aliasing makes it difficult to work with floating-point and SIMD operations in the same program.[10] To maximize performance, software often used the processor exclusively in one mode or the other, deferring the relatively slow switch between them as long as possible.

Each 64-bit MMX register corresponds to the mantissa part of an 80-bit x87 register. The upper 16 bits of the x87 registers thus go unused in MMX, and these bits are all set to ones, making them Not a Number (NaN) data types, or infinities in the floating-point representation. This can be used by software to decide whether a given register's content is intended as floating-point or SIMD data.

Software support

Software support for MMX developed slowly.[5] Intel's C Compiler and related development tools obtained intrinsics for invoking MMX instructions and Intel released libraries of common vectorized algorithms using MMX. Both Intel and Metrowerks attempted automatic vectorization in their compilers, but the operations in the C programming language mapped poorly onto the MMX instruction set and custom algorithms as of 2000 typically still had to be written in assembly language.[10]

Successors

AMD, a competing x86 microprocessor vendor, enhanced Intel's MMX with their own 3DNow! instruction set. 3DNow is best known for adding single-precision (32-bit) floating-point support to the SIMD instruction-set, among other integer and more general enhancements.

Following MMX, Intel's next major x86 extension was the Streaming SIMD Extensions (SSE), introduced with the Pentium III family[11] in 1999,[12] roughly a year after AMD's 3DNow! was introduced.

SSE addressed the core shortcomings of MMX (inability to mix integer-SIMD ops with any floating-point ops) by creating a new 128-bit wide register file (XMM0–XMM7) and new SIMD instructions for it. Like 3DNow!, SSE focused exclusively on single-precision floating-point operations (32-bit); integer SIMD operations were still performed using the MMX register and instruction set. However, the new XMM register-file allowed SSE SIMD-operations to be freely mixed with either MMX or x87 FPU ops.

Streaming SIMD Extensions 2 (SSE2), introduced with the Pentium 4, further extended the x86 SIMD instruction set with integer (8/16/32 bit) and double-precision floating-point data support for the XMM register file. SSE2 also allowed the MMX operation codes (opcodes) to use XMM register operands, extended to even wider YMM and ZMM registers by later SSE revisions.

MMX in embedded applications

Intel's and Marvell Technology Group's XScale microprocessor core starting with PXA270 include an SIMD instruction set architecture extension to the ARM architecture core named Intel Wireless MMX Technology (iwMMXt) which functions are similar to those of the IA-32 MMX extension.[13][14][15] It provides arithmetic and logic operations on 64-bit integer numbers, in which the software may choose to instead perform two 32-bit, four 16-bit or eight 8-bit operations in one instruction. The extension contains 16 data registers of 64-bits and eight control registers of 32-bits. All registers are accessed through standard ARM architecture coprocessor mapping mechanism. iwMMXt occupies coprocessors 0 and 1 space, and some of its opcodes clash with the opcodes of the earlier floating-point extension, FPA.[citation needed]

Later versions of Marvell's ARM processors support both Wireless MMX (WMMX) and Wireless MMX2 (WMMX2) opcodes.

See also

References

  1. 1.0 1.1 "Makers Unveil PCs With Intel's MMX Chip". The New York Times. January 9, 1997. https://archive.nytimes.com/www.nytimes.com/library/cyber/week/010997intel.html. "Intel's new multimedia extension technology, called MMX, ..." 
  2. Ch, Rajiv; rasekaran (January 8, 1997). "Intel to unveil faster Pentium chip". The Washington Post. https://www.washingtonpost.com/archive/business/1997/01/08/intel-to-unveil-faster-pentium-chip/9d6bdbd2-51b0-4a56-b24a-f4b1ee8b795e. 
  3. "Embedded Pentium Processors with MMX Technology". http://www.intel.com/design/intarch/mmx/mmx.htm. 
  4. Mittal, Millind; Peleg, Alex; Weiser, Uri (1997). "MMX Technology Architecture Overview". Intel Technology Journal 1 (3). http://www.intel.com/content/dam/www/public/us/en/documents/research/1997-vol01-iss-3-intel-technology-journal.pdf. Retrieved October 29, 2015. 
  5. 5.0 5.1 Calem, Robert E. (January 24, 1997). "Intel's MMX: The Technology Behind the Hoopla". The New York Times. https://archive.nytimes.com/www.nytimes.com/library/cyber/week/012497intel.html. 
  6. Tanaka, Jennifer (February 16, 1997). "A new chip off the block". Newsweek. https://www.newsweek.com/new-chip-block-175014. Retrieved August 31, 2019. ""the name, which doesn't stand for anything"". 
  7. "Intel | Data Center Solutions, IoT, and PC Innovation". http://www.intel.com/content/www/us/en/trademarks/mmx.html. 
  8. "Intel and Advance Micro agree on chip trademark". The New York Times. April 22, 1997. https://www.nytimes.com/1997/04/22/business/intel-and-advance-micro-agree-on-chip-trademark.html. 
  9. Pfeiffer, Joseph J. Jr. (1997). "MMX Microarchitecture of Pentium Processors With MMX Technology and Pentium II Microprocessors". Intel Technology Journal. https://www.cs.nmsu.edu/~pfeiffer/classes/473/notes/micro.pdf. Retrieved September 1, 2017. 
  10. 10.0 10.1 Conte, G.; Tommesani, S.; Zanichelli, F. (2000). "The long and winding road to high-performance image processing with MMX/SSE". Proceedings of IEEE International Workshop on Computer Architectures for Machine Perception. https://air.unipr.it/retrieve/handle/11381/2297671/6288/camp2000.pdf. 
  11. Kay, Alan S. (February 26, 1999). "Pentium III: Buy the Numbers?". The Washington Post. https://www.washingtonpost.com/archive/business/technology/1999/02/26/pentium-iii-buy-the-numbers/b449fa0b-071a-41f7-a623-4781a3409a62/. 
  12. "Microprocessor Hall of Fame". http://www.intel.com/museum/online/hist_micro/hof/. 
  13. "Intel Brings MMX™ Technology To Intel® Personal Internet Client Architecture-Based Wireless Devices". https://www.intel.com/pressroom/archive/releases/2002/20020910net.htm. 
  14. "Intel Delivers Next-Generation Processors Specifically Designed For Cell Phones And Wireless PDAs". https://www.intel.com/pressroom/archive/releases/2004/20040412net.htm. 
  15. "World's smallest PXA270 embedded CPU card?". 15 September 2004. https://www.eetimes.com/worlds-smallest-pxa270-embedded-cpu-card/. 

External links