EasyManua.ls Logo

Freescale Semiconductor MC68881 - N O N S I G N a L I N G Nans; Signaling Nans; Operation Post Processing; Operation Table Example (FADD Instruction)

Default Icon
409 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
_ .~ _Source In
Range Zero
Infinity
Destination
~ + - + - + -
In Range + Add Add +inf -inf
+ ~ O.O 0.01
Zero _ Add 0,O 1 -0.0 +inf -inf
+ +inf +inf +inf NAN 2
Zero
-inf inf NAN 2 -inf
NOTES:
1, Returns +0.0 in rounding modes RN, RZ, and RP; returns -0.0 in RM
2. Sets the OPERR bit in the FPSR exception byte~
3. If either operand is a NAN, refer to 4.5,4 NANs for more information.
Figure 4-2. Operation Table Example (FADD Instruction)
is executed to obtain the result, If a label such as ADD appears in the table, it indicates
that the FPCP performs the indicated operation and returns the correct result.
A third example of using the tables is when a source operand is plus infinity and the
destination operand is minus infinity. Since the result of such an opei'ation is undefined,
a not-a-number (NAN) is returned as the result, and the OPERR bit is set in the FPSR
exception byte.
4.5.4 NANs
In addition to the data types covered in the operation tables for each instruction, NANs
can also be used as inputs to an arithmetic operation. The operation tables do not contain
a row and column for NANs because NANs are handled the same way in all operations.
4.5.4.1 NONSIGNALING NANs. If either, but not both, operand of an operation is a NAN,
and it is a nonsignaling NAN, then that NAN is returned as the result. If both operands are
nonsignaling NANs, then the destination operand nonsignaling NAN is returned as the
result.
4.5.4.2 SIGNALING NANs. If either operand to an operation is a signaling NAN (SNAN),
then the SNAN bit is set in the FPSR EXC byte. If the SNAN trap enable bit is set in the
FPCR ENABLE byte, then the trap is taken and the destination is not modified. If the SNAN
trap
enable
bit is not set, then the SNAN is converted to a nonsignaling NAN (by setting
the SNAN bit in the operand to a one), and the operation continues as described in the
preceding paragraph for nonsignaling NANs.
4.5.5 Operation Post Processing
Most floating-point operations end with an identical post processing step. While reading
the summary for each instruction, it should be assumed that an instruction performs post
processing unless the summary specifically states that the instruction does not do so. The
following paragraphs describe post processing in detail.
MC68881/MC68882 USER'S MANUAL FREESCALE
4-15

Table of Contents

Related product manuals