Another paragraph for SPARC Appendix N - nonstandard mode
David G. Hough
dgh
Fri Jul 13 17:55:18 PDT 1990
# This is a shell archive. Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by validgh!dgh on Fri Jul 13 17:54:21 PDT 1990
# Contents: /tmp/nsm
echo x - /tmp/nsm
sed 's/^a//' > "/tmp/nsm" <<'a//E*O*F /tmp/nsm//'
a.SH
Nonstandard mode
a.PP
SPARC implementations are permitted but not encouraged to deviate from SPARC requirements
when the nonstandard mode bit of the FSR is 1.
Although different subnormal handling is not required in nonstandard mode,
all known implementations use that bit to provide alternative handling of subnormal
floating-point operands and results that avoids unfinished_FPop traps.
a.p
Such traps could be avoided by proper system design. Cache misses in the
CPU cause holds in the FPU, in order for extra cycles to occur to refill the cache,
so that their occurrence is invisible to software and doesn't degrade performance
in the normal cache hit case.
Similarly "subnormal misses" in the FPU should cause holds in the CPU,
so that extra cycles to align operands or results may take place invisibly
to software, rather than causing an unfinished_FPop trap or degrading performance
in the normal case. These "subnormal misses" may also be avoided by brute force
by providing extra normalization hardware for operands and results, if this
is cheaper than holding the CPU.
a.p
So the best implementation of nonstandard mode is a noop - it runs identically
to the standard SPARC mode. Second best is to implement nonstandard mode
for subnormal operands and results as outlined below so that implementations
behave uniformly:
a.IP "Subnormal operands"
in nonstandard mode are replaced by zeros with the same sign.
An inexact exception always arises if no other exception would, and so
traps if NXM=1.
a.IP "Untrapped subnormal results"
in nonstandard mode are replaced by zeros with the same sign.
Underflow and inexact exceptions always arise.
In terms of the previous table,
a.KS
a.TS
center ;
l l r r r r .
underflow trap UFM=1 UFM=0 UFM=0
inexact trap NXM=? NXM=1 NXM=0
_
\fIu = r\fP \fIr\fP is minimum normal none none none
\fIu = r\fP \fIr\fP is zero none none none
\fIu \(!= r\fP \fIr\fP is minimum normal UF NX uf nx
\fIu \(!= r\fP \fIr\fP is zero UF NX uf nx
a.TE
a.KE
a//E*O*F /tmp/nsm//
chmod u=rw,g=rw,o=r /tmp/nsm
exit 0
More information about the Numeric-interest
mailing list