Motorola M68060 User Manual page 135

Table of Contents

Advertisement

tests that set the BSUN bit in the FPSR status byte if an unordered condition is present when
the conditional test is attempted (IEEE nonaware tests), and 16 tests that do not cause the
BSUN bit in the FPSR status byte (IEEE aware tests). The set of IEEE nonaware tests is
best used:
• When porting a program from a system that does not support the IEEE 754 standard to
a conforming system, or
• When generating high-level language code that does not support IEEE floating-point
concepts (i.e., the unordered condition).
An unordered condition occurs when one or both of the operands in a floating-point compare
operation is a NAN. The inclusion of the unordered condition in floating-point branches
destroys the familiar trichotomy relationship (greater than, equal, less than) that exists for
integers. For example, the opposite of floating-point branch greater than (FBGT) is not float-
ing-point branch less than or equal (FBLE). Rather, the opposite condition is floating-point
branch not greater than (FBNGT). If the result of the previous instruction was unordered,
FBNGT is true; whereas, both FBGT and FBLE would be false since unordered fails both of
these tests. Compiler programmers should be particularly careful of the lack of trichotomy in
the floating-point branches since it is common for compilers to invert the sense of conditions.
When using the IEEE nonaware tests, the BSUN bit and the NAN bit are set in the FPSR,
unless the branch is an FBEQ or an FBNE. If the BSUN exception is enabled in the FPCR,
an exception is taken. Therefore, the IEEE nonaware program may be interrupted if an
unexpected condition occurs.
Compilers and programmers who are knowledgeable of the IEEE 754 standard should use
the IEEE aware tests in programs that contain ordered and unordered conditions. Since the
ordered or unordered attribute is explicitly included in the conditional test, the BSUN bit is
not set in the FPSR EXC byte when the unordered condition occurs.
Table 6-9 summarizes the conditional mnemonics, definitions, equations, predicates, and
whether the BSUN bit is set in the FPSR EXC byte for the 32 floating-point conditional tests.
The equation column lists the combination of FPCC bits for each test in the form of an equa-
tion.
MOTOROLA
M68060 USER'S MANUAL
Floating-Point Unit
6-17

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68060Mc68lc060Mc68ec060

Table of Contents