Coprocessor Internal State Frames - Motorola MC68020 User Manual

Table of Contents

Advertisement

information to the main processor during the execution of these instructions. These
coprocessor format codes are discussed in detail in 7.2.3.2 Coprocessor Format Words.
7.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 internal state frame as a sequence of long-
word entries in memory. Figure 7-14 shows the format of a coprocessor state frame. The
format and length fields of the coprocessor state frame format comprise the format word.
During execution of the cpSAVE instruction, the MC68020/EC020 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 length field multiplied by
four. During execution of the cpRESTORE instruction, the MC68020/EC020 reads the
state frame from ascending addresses beginning with the effective address specified in
the instruction operation word.
SAVE
RESTORE
ORDER
ORDER
31
0
0
n
1
n–1
2
n–2
3
1
n
Figure 7-14. Coprocessor State Frame Format in Memory
The processor stores the coprocessor format word at the lowest address of the state
frame in memory, and this word is the first word transferred for both the cpSAVE and
cpRESTORE instructions. The word following the format word does not contain
information relevant to the coprocessor state frame, but serves to keep the information in
the state frame a multiple of four bytes in size. The number of entries following the format
word (at higher addresses) is determined by the format word length for a given
coprocessor state.
7-18
24
23
FORMAT
LENGTH
COPROCESSOR-DEPENDENT INFORMATION
M68020 USER'S MANUAL
16
15
(UNUSED, RESERVED)
0
MOTOROLA

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68ec020

Table of Contents