Loading...
MC68060 Software Package
C-16
M68060 USER’S MANUAL
MOTOROLA
C.3.2.3.1 Overflow/Underflow.
Floating-point overflow and underflow are nonmaskable
exceptions on the MC68060 (as they were on the MC68040). When either occur, the corre-
sponding exception is taken regardless, whether the user overflow or underflow enable bit
is set in the FPCR or not. The purpose of these nonmaskable exceptions is to allow software
to generate the default underflow and overflow results as produced by the MC68881/882.
The M68060FPSP acts differently according to the four following cases:
1. Overflow/Underflow disabled, overflow occurred, and inexact is enabled—the
M68060FPSP exception handler, _fpsp_ovfl, calculates the default result and stores
this value at the destination. Second, the exceptional operand value is calculated and
restored, with exceptional status, into the FPU with an FRESTORE instruction. The
overflow stack frame is then converted into an inexact stack frame. Finally, a branch
is taken to the operating system-supplied call-out (_real_inex) for the user enabled in-
exact exception handler.
2. Overflow/Underflow disabled, underflow occurred, inexact is enabled, and the result is
inexact—the M68060FPSP exception handler, _fpsp_unfl, calculates the default re-
sult and stores this value at the destination. Second, the exceptional operand value is
calculated and restored, with exceptional status, into the FPU with an FRESTORE in-
struction. The overflow stack frame is then converted into an inexact stack frame. Fi-
nally, a branch is taken to the operating system-supplied call-out (_real_inex) for the
user-enabled inexact exception handler.
3. Overflow, underflow, and inexact disabled—the M68060FPSP exception handler,
_fpsp_ovfl or _fpsp_unfl, calculates the default result rounded to the proper mode and
precision, and stores this result at the destination. The handler then returns the pro-
cessor to normal processing.
4. Overflow or underflow enabled—the M68060FPSP exception handler, _fpsp_ovfl or
_fpsp_unfl, calculates the default result and stores this value at the destination. Sec-
ond, the exceptional operand value is calculated and restored, with exceptional status,
into the FPU with an FRESTORE instruction. Next, a branch is taken to the operating
system-supplied call-out (_real_{ovfl,unfl}) for the user enabled overflow or underflow
exception handler. At this point, the overflow/underflow exception frame is on the
stack. The exceptional operand can be located in the FSAVE frame. The destination
operand is not available. The source operand may not be available. The following
short list details the information available to _real_{ovfl,unfl} when the M68060FPSP
passes control there:
Memory or data register destination
—exception stack frame: the six-word post-instruction stack frame contains the
PC of the next instruction and the effective address of the destination operand.
—in the FSAVE frame: the exceptional operand which is the intermediate result
rounded to the destination precision, with the 15-bit exponent biased as a nor-
mal extended-precision number. The user ovfl/unfl handler must execute an
“FSAVE” to retrieve this value.
—at the destination location: default result (same as with exceptions disabled).
—FPIAR: address of the instruction that underflowed/overflowed.
Loading...
Terms of Use | Privacy Policy | DMCA Policy
2006-2020 Rsmanuals.com