Errata
Specification Update
21
AN12.
FP Inexact-Result Exception Flag May Not Be Set
Problem:
When the result of a floating-point operation is not exactly represented in the
destination format (1/3 in binary form, for example), an inexact-result (precision)
exception occurs. When this occurs, the PE bit (bit 5 of the FPU status word) is
normally set by the processor. Under certain rare conditions, this bit may not be set
when this rounding occurs. However, other actions taken by the processor (invoking
the software exception handler if the exception is unmasked) are not affected. This
erratum can only occur if the floating-point operation which causes the precision
exception is immediately followed by one of the following instructions:
•
FST m32real
•
FST m64real
•
FSTP m32real
•
FSTP m64real
•
FSTP m80real
•
FIST m16int
•
FIST m32int
•
FISTP m16int
•
FISTP m32int
•
FISTP m64int
Note that even if this combination of instructions is encountered, there is also a
dependency on the internal pipelining and execution state of both instructions in the
processor.
Implication:
Inexact-result exceptions are commonly masked or ignored by applications, as it
happens frequently, and produces a rounded result acceptable to most applications.
The PE bit of the FPU status word may not always be set upon receiving an inexact-
result exception. Thus, if these exceptions are unmasked, a floating-point error
exception handler may not recognize that a precision exception occurred. Note that
this is a “sticky” bit, i.e., once set by an inexact-result condition, it remains set until
cleared by software.
Workaround:
This condition can be avoided by inserting either three NOPs or three non-floating-
point non-Jcc instructions between the two floating-point instructions.
Status: