
Chapter 4: 128-Bit Media and Scientific Programming
221
24593—Rev. 3.09—September 2003
AMD 64-Bit Technology
Unmasked Responses.
If the processor detects an unmasked
exception, it sets the associated exception flag in the MXCSR
register and invokes the SIMD floating-point exception handler.
The processor does not write a result or change any of the
source operands for any type of unmasked exception. The
exception handler must determine which exception occurred
(by examining the exception flags in the MXCSR register) and
take appropriate action.
In all cases of unmasked exceptions, before calling the
exception handler, the processor examines the
CR4.OSXMMEXCPT bit to see if it is set to 1. If it is set, the
processor calls the #XF exception (vector 19). If it is cleared,
the processor calls the #UD exception (vector 6). See “System-
Control Registers” in Volume 2 for details.
For details about the operations that can cause unmasked
exceptions, see “SIMD Floating-Point Exception Causes” on
page 211 and Table 4-15.
Using NaNs in IE Diagnostic Exceptions.
Both SNaNs and QNaNs can
be encoded with many different values to carry diagnostic
information. By means of appropriate masking and unmasking
Underflow
exception (UE)
Inexact denormalized result
MXCSR flush-to-zero (FZ)
bit = 0
Set PE flag and return
denormalized result.
MXCSR flush-to-zero (FZ)
bit = 1
Set PE flag and return zero,
with sign of true result.
3
Precision
exception (PE)
Inexact normalized or
denormalized result
Without OE or UE exception
Return rounded result.
With masked OE or UE
exception
Respond as for OE or UE
exception.
With unmasked OE or UE
exception
Respond as for OE or UE
exception, and invoke SIMD
exception handler.
Table 4-15.
Masked Responses to SIMD Floating-Point Exceptions
(continued)
Exception
Operation
1
Processor Response
2
Notes:
1. For complete details about operations, see “SIMD Floating-Point Exception Causes” on page 211.
2. In all cases, the processor sets the associated exception flag in MXCSR. For details about number representation, see “Floating-
Point Number Representation” on page 153 and “Floating-Point Number Encodings” on page 156.
3. This response does not comply with the IEEE 754 standard, but it offers higher performance.