Motorola CPU32 Bedienungsanleitung Seite 100

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 646
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 99
Instruction Set Summary
MOTOROLA M68000 FAMILY PROGRAMMER’S REFERENCE MANUAL 3-29
The inclusion of the NAN data type in the IEEE floating-point number system requires each
conditional test to include the NAN condition code bit in its Boolean equation. Because a
comparison of a NAN with any other data type is unordered (i.e., it is impossible to determine
if a NAN is bigger or smaller than an in-range number), the compare instruction sets the
NAN condition code bit when an unordered compare is attempted. All arithmetic instructions
also set the NAN bit if the result of an operation is a NAN. The conditional instructions
interpret the NAN condition code bit equal to one as the unordered condition.
The IEEE 754 standard defines four conditions: equal to (EQ), greater than (GT), less than
(LT), and unordered (UN). In addition, the standard only requires the generation of the
condition codes as a result of a floating-point compare operation. The FPU can test these
conditions at the end of any operation affecting the condition codes. For purposes of the
floating-point conditional branch, set byte on condition, decrement and branch on condition,
and trap on condition instructions, the processor logically combines the four FPCC condition
codes to form 32 conditional tests. There are three main categories of conditional tests:
IEEE nonaware tests, IEEE aware tests, and miscellaneous. The set of IEEE nonaware
tests is best used:
when porting a program from a system that does not support the IEEE 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).
The 32 conditional tests are separated into two groups; 16 that cause an exception if an
unordered condition is present when the conditional test is attempted and 16 that do not
cause an exception. An unordered condition occurs when one or both of the operands in a
floating-point compare operation 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 floating-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 (and sets BSUN). 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.
Table 3-22. FPCC Encodings
Data Type N Z I NAN
+ Normalized or Denormalized 0000
– Normalized or Denormalized 1000
+ 0 0100
0 1100
+ Infinity 0010
– Infinity 1010
+ NAN 0001
NAN 1001
Seitenansicht 99
1 2 ... 95 96 97 98 99 100 101 102 103 104 105 ... 645 646

Kommentare zu diesen Handbüchern

Keine Kommentare