English
Language : 

MC68030 Datasheet, PDF (286/602 Pages) Motorola, Inc – ENHANCED 32-BIT MICROPROCESSOR
Exception Processing
8.3 COPROCESSOR CONSIDERATIONS
Exception handler programmers should consider carefully whether to save and restore the
context of a coprocessor at the beginning and end of handler routines for exceptions that
can occur during the execution of a coprocessor instruction (i.e., bus errors, interrupts, and
coprocessor-related exceptions). The nature of the coprocessor and the exception handler
routine determines whether or not saving the state of one or more coprocessors with the
cpSAVE and cpRESTORE instructions is required. If the coprocessor allows multiple
coprocessor instructions to be executed concurrently, it may require its state to be saved
and restored for all coprocessor-generated exceptions, regardless of whether or not the
coprocessor is accessed during the handler routine. The MC68882 floating-point
coprocessor is an example of this type of coprocessor. On the other hand, the MC68881
floating-point coprocessor requires FSAVE and FRESTORE instructions within an
exception handler routine only if the exception handler itself uses the coprocessor.
8.4 EXCEPTION STACK FRAME FORMATS
The MC68030 provides six different stack frames for exception processing. The set of
frames includes the normal four- and six-word stack frames, the four-word throwaway stack
frame, the coprocessor mid-instruction stack frame, and the short and long bus fault stack
frames.
When the MC68030 writes or reads a stack frame, it uses long-word operand transfers
wherever possible. Using a long-word-aligned stack pointer with memory that is on a 32-bit
port greatly enhances exception processing performance. The processor does not
necessarily read or write the stack frame data in sequential order.
The system software should not depend on a particular exception generating a particular
stack frame. For compatibility with future devices, the software should be able to handle any
type of stack frame for any type of exception.
Table 8-6 summarizes the stack frames defined for the M68000 Family.
8-32
MC68030 USER’S MANUAL
MOTOROLA