9-2
PROGRAMMING WITH THE STREAMING SIMD EXTENSIONS
9.1.OVERVIEW OF THE STREAMING SIMD EXTENSIONS
The Streaming SIMD Extensions introduce new, general-purpose, floating-point instructions,
that operate on a new set of eight 128-bit SIMD floating-point registers. This set enables the
programmer to develop algorithms that can finely-mix packed, single-precision, floating-point
and integer using both Streaming SIMD Extensions and MMX instructions respectively. In
addition to these instructions, Streaming SIMD Extensions also provide new instructions to
control cacheability of all MMX technology and 32-bit IA data types. These instructions
include the ability to stream data to memory without polluting the caches, and the ability to
prefetch data before it is actually used.
The Streaming SIMD Extensions provide the following new extensions to the IA programming
environment:
Eight SIMD floating-point registers (XMM0 through XMM7).
SIMD floating-point data type - 128-bit, packed floating-point.
The Streaming SIMD Extensions set.
The SIMD floating-point registers and data types are described in the following sections. Refer
to Section 9.3., Overview of the Streaming SIMD Extensions Set, for an overview of the
Streaming SIMD Extensions.
9.1.1.SIMD Floating-Point Registers
The IA Streaming SIMD Extensions provide eight 128-bit general-purpose registers, each of
which can be directly addressed. These registers are new, and require support from the operating
system to use them.
The SIMD floating-point registers hold packed 128-bit data. The Streaming SIMD Extensions
access the SIMD floating-point registers directly using the register names XMM0 to XMM7
(Figure 9-1). SIMD floating-point registers can be used to perform calculations on data; they
cannot be used to address memory. Addressing is accomplished by using the integer registers
and standard IA addressing modes and general-purpose registers (EAX, EBX, ECX, EDX, EBP,
ESI, EDI, and ESP).
There is a new control/status register MXCSR, that is used to mask/unmask numerical exception
handling, to set rounding modes, to set flush-to-zero mode, and to view status flags.