Sun Microelectronics
243
14. Implementation Dependencies
14.3.1.2 Subnormal Results
If FSR.NS=1, the subnormal results are replaced by zero with the same sign. Un-
derflow and inexact exceptions are signalled in this case. This will cause an
fp_exception_ieee_754
trap if enabled by FSR.TEM (only ufc will be set in FSR.cexc
when underflow trap is enabled, otherwise only nxc will be set when inexact trap
is enabled). If FSR.NS=0, then subnormal results generate traps according to
Table 14-5. For FDTOS and FADD, E
R
is the biased exponent of the result before
rounding. For multiply, E
R
is the biased sum of the exponents plus one. For di-
vide, E
R
is the biased difference of the exponents of the operands.
14.3.2 Overflow, Underflow, and Inexact Traps (Impdep #3, 55)
UltraSPARC implements precise floating-point exception handling. Underflow is
detected before rounding. Prediction of overflow, underflow and inexact traps for
divide and square root is used to simplify the hardware.
For divide, pessimistic prediction occurs when underflow/overflow can not be
determined from examining the source operand exponents. For divide and
square root, pessimistic prediction of inexact occurs unless one of the operands is
a zero, NAN or infinity. When pessimistic prediction occurs and the exception is
Table 14-4
Subnormal Operand Trapping Cases (NS=0)
Operations
One Subnormal Operand
Two Subnormal
Operands
F(sd)TO(ix)
F(sd)TO(ds)
FSQRT(sd)
Unfinished trap always
—
FADD/SUB(sd)
FSMULD
Unfinished trap always
Unfinished trap always
FMUL(sd)
FDIV(sd)
Unfinished trap if no overflow and:
-25 < E
R
(SP);
-54 < E
R
(DP)
Unfinished trap always
Table 14-5
Subnormal Result Trapping Cases (NS=0)
Operations
Trap
FDTOS
FADD/SUB(sd)
FMUL(sd)
Unfinished trap if:
-25 <
E
R
< 1 (SP)
-54 <
E
R
< 1 (DP)
FDIV(sd)
Unfinished trap if:
-25 <
E
R
≤
1 (SP)
-54 <
E
R
≤
1 (DP)
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com