
230
Chapter 5: 64-Bit Media Programming
AMD 64-Bit Technology
24593—Rev. 3.09—September 2003
5.2
Compatibility
64-bit media instructions can be executed in any of the
architecture’s operating modes. Existing MMX and 3DNow!
binary programs run in legacy and compatibility modes without
modification. The support provided by the AMD64 architecture
for such binaries is identical to that provided by legacy x86
architectures.
To run in 64-bit mode, 64-bit media programs must be
recompiled. The recompilation has no side effects on such
programs, other then to make available the extended general-
purpose registers and 64-bit virtual address space.
The MMX and 3DNow! instructions introduce no additional
registers, status bits, or other processor state to the legacy x86
architecture. Instead, they use the x87 floating-point registers
that have long been a part of most x86 architectures. Because of
this, 64-bit media procedures require no special operating-
system support or exception handlers. When state-saves are
required between procedures, the same instructions that
system software uses to save and restore x87 floating-point state
also save and restore the 64-bit media-programming state.
5.3
Capabilities
The 64-bit media instructions are designed to support
multimedia and communication applications that operate on
vectors of small-sized data elements. For example, 8-bit and 16-
bit integer data elements are commonly used for pixel
information in graphics applications, and 16-bit integer data
elements are used for audio sampling. The 64-bit media
instructions allow multiple data elements like these to be
packed into single 64-bit vector operands located in an MMX
register or in memory. The instructions operate in parallel on
each of the elements in these vectors. For example, 8-bit integer
data can be packed in vectors of eight elements in a single 64-
bit register, so that all eight byte elements are operated on
simultaneously by a single instruction.
Typical applications of the 64-bit media integer instructions
include music synthesis, speech synthesis, speech recognition,
audio and video compression (encoding) and decompression
(decoding), 2D and 3D graphics (including 3D texture
mapping), and streaming video. Typical applications of the 64-