MIPS R4000 Microprocessor User's Manual 197
Floating-Point Exceptions
7.5 Saving and Restoring State
Sixteen doubleword coprocessor load or store operations save or restore
the coprocessor floating-point register state in memory. The remainder of
control and status information can be saved or restored through Move To/
From Coprocessor Control Register instructions, and saving and restoring
the processor registers. Normally, the Control/Status register is saved first
and restored last.
When the coprocessor Control/Status register (FCR31) is read, and the
coprocessor is executing one or more floating-point instructions, the
instruction(s) in progress are either completed or reported as exceptions.
The architecture requires that no more than one of these pending
instructions can cause an exception. If the pending instruction cannot be
completed, this instruction is placed in the Exception register, if present.
Information indicating the type of exception is placed in the Control/Status
register. When state is restored, state information in the status word
indicates that exceptions are pending.
Writing a zero value to the Cause field of Control/Status register clears all
pending exceptions, permitting normal processing to restart after the
floating-point register state is restored.
The Cause field of the Control/Status register holds the results of only one
instruction; the FPU examines source operands before an operation is
initiated to determine if this instruction can possibly cause an exception. If
an exception is possible, the FPU executes the instruction in stall mode to
ensure that no more than one instruction (that might cause an exception)
is executed at a time.