FDBcc Test Condition. Decrement. and Branch FDBcc
Instruction Format:
15 14 13 4 3 2 1 0
COUNT
1 1 I 0 1 REGISTER
0 0 0 CONDITIONAL PREDICATE
12 11 10 9 8 ? 6 5
COPROCESSOR
I 0 0 1 0
ID
0 [ 0 I 0 0
0 0
=
0
16-B]T DISPLACEMENT
Instruction Fields:
Coprocessor ID Field -- Specifies which coprocessor in the system is to execute this
instruction. Freescale assemblers default to ID = 1 for the FPCP.
Count Register Field -- Specifies main processor data register that is used as the
counter.
Conditional Predicate Field -- Specifies one of the 32 floating-point conditional tests
as described in 4.4 CONDITIONAL TEST DEFINITIONS.
Displacement Field --Specifies the branch distance (from the address of the instruction
plus two) to the destination in bytes.
NOTES:
1. The terminating condition is like that defined by the UNTIL loop constructs of high-
level languages. For example: FDBOLT can be stated as "decrement and branch until
ordered less than".
2. There are two basic ways of entering a loop: at the beginning, or by branching to the
trailing FDBcc instruction. If a loop structure terminated with FDBcc is entered at the
beginning, the control counter must be one less than the number of loop executions
desired. This count is useful for indexed addressing modes and dynamically specified
bit operations. However, when entering a loop by branching directly to the trailing
FDBcc instruction~ the count should equal the loop execution count. In this case, if
the counter is zero when the loop is entered, the FDBcc instruction does not branch,
causing a complete bypass of the main loop.
3. When a BSUN exception occurs, a pre-instruction exception is taken by the main
processor. If the exception handler returns without modifying the image of the PC on
the stack frame (to point to the instruction following the FDBcc), then it must clear
the cause of the exception (by clearing the NAN bit or disabling the BSUN trap) or
the exception occurs again immediately upon return to the routine that caused the
exception.
MC68881/MC68882 USER'S MANUAL FREESCALE
4-39