
Chapter 6: x87 Floating-Point Programming
341
24593—Rev. 3.09—September 2003
AMD 64-Bit Technology
denormalized form, as described in “Denormalized (Tiny)
Numbers” on page 306.
Denormalized Single-Precision or Double-Precision Load
—An
instruction loads a single-precision or double-precision (but
not double-extended-precision) operand, which is in
denormalized form, into an x87 register.
Zero-Divide Exception (ZE).
The ZE exception occurs when:
Divisor is Zero
—An FDIV, FDIVP, FDIVR, FDIVRP, FIDIV, or
FIDIVR instruction attempts to divide zero into a non-zero
finite dividend.
Source Operand is Zero
—An FYL2X or FXTRACT instruction
uses a source operand that is zero.
Overflow Exception (OE).
The OE exception occurs when the value
of a rounded floating-point result is larger than the largest
representable normalized positive or negative floating-point
number in the destination format, as shown in Table 6-5 on
page 303. An overflow can occur through computation or
through conversion of higher-precision numbers to lower-
precision numbers. See “Precision” on page 313. Integer and
BCD overflow is reported via the invalid-operation exception.
Underflow Exception (UE).
The UE exception occurs when the value
of a rounded, non-zero floating-point result is too small to be
represented as a normalized positive or negative floating-point
number in the destination format, as shown in Table 6-5 on
page 303. Integer and BCD underflow is reported via the
invalid-operation exception.
Precision Exception (PE).
The PE exception, also called the
inexact-
result
exception, occurs when a floating-point result, after
rounding, differs from the infinitely precise result and thus
cannot be represented exactly in the specified destination
format. Software that does not require exact results normally
masks this exception. See “Precision” on page 313 and
“Rounding” on page 314.
Stack Fault (SF).
The SF exception occurs when a stack overflow
(due to a push or load into a non-empty stack register) or stack
underflow (due to referencing an empty stack register) occurs
in the x87 stack-register file. The empty and non-empty
conditions are shown in Table 6-3 on page 296. When either of
these conditions occur, the processor also sets the invalid-