Release 1.0, 1 July 2002 F. Chapter B IEEE Std 754-1985 Requirements for SPARC V9 63
Implementation Note –
Detecting the exact boundary conditions requires a large
amount of hardware. SPARC64 V detects approximate boundary conditions by
calculating the exponent intermediate result (the exponent before rounding) from
input operands, to avoid the hardware cost. Since the computation of the boundary
conditions is approximate, the detection of a zero result or an overflow result shall
be pessimistic. SPARC64 V generates an
unfinished_FPop
exception pessimistically.
The equations to calculate the result exponent to detect the boundary conditions
from the input exponents are presented in
TABLE B-1
, where Er is the approximation
of the biased result exponent before rounding and is calculated only from the input
exponents (esrc1, esrc2). Er is to be used for detecting the boundary condition for an
unfinished_FPop
.
esrc1 and esrc2 are the biased exponents of the input operands. When the
corresponding input operand is a denormalized number, the value is 0.
From Er, eres is calculated. eres is a biased result exponent, after mantissa alignment
and before rounding, where the appropriate adjustment of the exponent is applied to
the result mantissa: left-shifting or right-shifting the mantissa to the implicit 1 at the
left of the binary point, subtracting or adding the shift-amount to the exponent. The
result mantissa is assumed to be 1.xxxx in calculating eres. If the result is a
denormalized number, eres is less than zero.
TABLE B-2
describes the boundary condition of each floating-point instruction that
generates an
unfinished_FPop
exception.
TABLE B-1
Result Exponent Approximation for Detecting
unfinished_FPop
Boundary
Conditions
Operation Formula
fmuls Er = esrc1 + esrc2 − 126
fmuld Er = esrc1 + esrc2 − 1022
fdivs Er = esrc1 - esrc2 + 126
fdivd Er = esrc1 - esrc2 + 1022
TABLE B-2
unfinished_FPop
Boundary Conditions
Operation Boundary Conditions
FdTOs −25 < eres < 1 and TEM.UFM = 0.
FsTOd Second operand (rs2) is a denormalized number.
FADDs, FSUBs,
FADDd, FSUBd
1. One of the operands is a denormalized number, and the other operand is a normal,
nonzero floating-point number (except for a NaN and an infinity)
1
.
2. Both operands are denormalized numbers.
3. Both operands are normal nonzero floating-point numbers (except for a NaN and
an infinity), eres < 1, and TEM.UFM = 0.