English
Language : 

MC68030 Datasheet, PDF (380/602 Pages) Motorola, Inc – ENHANCED 32-BIT MICROPROCESSOR
Coprocessor Interface Description
10.2.3 Coprocessor Save and Restore Instructions
The coprocessor context save and context restore instruction categories in the M68000
coprocessor interface support multitasking programming environments. In a multitasking
environment, the context of a coprocessor may need to be changed asynchronously with
respect to the operation of that coprocessor. That is, the coprocessor may be interrupted at
any point in the execution of an instruction in the general or conditional category to begin
context change operations.
In contrast to the general and conditional instruction categories, the context save and
context restore instruction categories do not use the coprocessor response primitives. A set
of format codes defined by the M68000 coprocessor interface communicates status
information to the main processor during the execution of these instructions. These
coprocessor format codes are discussed in detail in 10.2.3.2 Coprocessor Format Words.
10.2.3.1 COPROCESSOR INTERNAL STATE FRAMES. The context save (cpSAVE) and
context restore (cpRESTORE) instructions transfer an internal coprocessor state frame
between memory and a coprocessor. This internal coprocessor state frame represents the
state of coprocessor operations. Using the cpSAVE and cpRESTORE instructions, it is
possible to interrupt coprocessor operation, save the context associated with the current
operation, and initiate coprocessor operations with a new context.
A cpSAVE instruction stores a coprocessor's internal state frame as a sequence of long-
word entries in memory. Figure 10-14 shows the format of a coprocessor state frame. During
execution of the cpSAVE instruction, the MC68030 calculates the state frame effective
address from information in the operation word of the instruction and stores a format word
at this effective address. The processor writes the long words that form the coprocessor
state frame to descending memory addresses, beginning with the address specified by the
sum of the effective address and the format word-length field multiplied by four. During
execution of the cpRESTORE instruction, the MC68030 reads the format word and long
words in the state frame from ascending addresses, beginning with the effective address
specified in the instruction operation word.
10-20
MC68030 USER’S MANUAL
MOTOROLA