
128
Chapter 4: 128-Bit Media and Scientific Programming
AMD 64-Bit Technology
24593—Rev. 3.09—September 2003
The 128-bit media instructions use data registers, a control and
status register (MXCSR), rounding control, and an exception
reporting and response mechanism that are distinct from and
functionally independent of those used by the x87 floating-
point instructions. Because of this, 128-bit media programming
support usually requires exception handlers that are distinct
from those used for x87 exceptions. This support is provided by
virtually all legacy operating systems for the x86 architecture.
4.2
Capabilities
The 128-bit media instructions are designed to support media
and scientific applications. The vector operands used by these
instructions allow applications to operate in parallel on
multiple elements of vectors. The elements can be integers
(from bytes to quadwords) or floating-point (either single-
precision or double-precision). Arithmetic operations produce
signed, unsigned, and/or saturating results.
The availability of several types of vector move instructions and
(in 64-bit mode) twice the legacy number of XMM registers (a
total of 16 such registers) can eliminate substantial memory-
access overhead, making a substantial difference in
performance.
4.2.1
Types of
Applications
Typical media applications well-suited to the 128-bit media
programming model include a broad range of audio, video, and
graphics programs. For example, music synthesis, speech
synthesis, speech recognition, audio and video compression
(encoding) and decompression (decoding), 2D and 3D graphics,
streaming video (up to high-definition TV), and digital signal
processing (DSP) kernels are all likely to experience higher
performance using 128-bit media instructions than using other
types of instructions in AMD64 architecture.
Such applications commonly use small-sized integer or single-
precision floating-point data elements in repetitive loops, in
which the typical operations are inherently parallel. For
example, 8-bit and 16-bit data elements are commonly used for
pixel information in graphics applications, in which each of the
RGB pixel components (red, green, blue, and alpha) are
represented by an 8-bit or 16-bit integer. 16-bit data elements
are also commonly used for audio sampling.