7-47
FLOATING-POINT UNIT
7.7.2.Automatic Exception Handling
If the FPU detects an exception condition for a masked exception (an exception with its mask
bit set), it sets the exception flag for the exception and delivers a predefined (default) response
and continues executing instructions. The masked (default) responses to exceptions have been
chosen to deliver a reasonable result for each exception condition and are generally satisfactory
for most floating-point applications. By masking or unmasking specific floating-point excep-
tions in the FPU control word, programmers can delegate responsibility for most exceptions to
the FPU and reserve the most severe exception conditions for software exception handlers.
Because the exception flags are sticky, they provide a cumulative record of the exceptions that
have occurred since they were last cleared. A programmer can thus mask all exceptions, run a
calculation, and then inspect the exception flags to see if any exceptions were detected during
the calculation.