
9-2
M68040 USER’S MANUAL
MOTOROLA
The MC68040 FPU is compatible with the MC68881/MC68882. The MC68040 performs
basic math functions such as floating-point addition and multiplication directly on
dedicated circuitry and performs transcendental functions such as sine and cosine
calculations by means of software routines. Motorola offers the M68040FPSP, a software
package providing these routines. The software functions are compatible with the
MC68881/MC68882, refer to
Appendix E Floating-Point Emulation (M68040FPSP)
.
9.2 FLOATING-POINT USER PROGRAMMING MODEL
Figure 9-1 illustrates the floating-point portion of the user programming model. The
following paragraphs describe the FPU portion of the user programming model for the
MC68040. The model, which is identical to the programming model for the
MC68881/MC68882 floating-point coprocessors, consists of the following registers:
Eight 80-Bit Floating-Point Data Registers (FP7–FP0)
16-Bit Floating-Point Control Register (FPCR)
32-Bit Floating-Point Status Register (FPSR)
32-Bit Floating-Point Instruction Address Register (FPIAR)
79
63
0
FP0
FP1
FP3
FP4
FP5
FP6
FP7
FP2
FLOATING-POINT
DATA REGISTERS
FPCR
FLOATING-POINT
CONTROL
REGISTER
FPSR
FLOATING-POINT
STATUS
REGISTER
FPIAR
FLOATING-POINT
INSTRUCTION
ADDRESS
REGISTER
0
7
15
31
MODE
CONTROL
EXCEPTION
ENABLE
0
EXCEPTION
STATUS
CONDITION
CODE
QUOTIENT
ACCRUED
EXCEPTION
0
7
15
31
23
0
31
Figure 9-1. Floating-Point User Programming Model
9.2.1 Floating-Point Data Registers (FP7–FP0)
The floating-point data registers are analogous to the integer data registers of the M68000
family. The floating-point data registers always contain extended-precision numbers. All
external operands, regardless of the data format, are converted to extended-precision
values before being used in any calculation or stored in a floating-point data register. A