7
needed. If the predecrement or postincrement addressing mode is used, the address reg-
ister is decremented or incremented (before or after the transfer) by the size of the operand
as indicated by the length field. The effective addressing modes that are valid for this
primitive are determined by the DR bit, and the mode is validated by the main processor.
If DR equals zero, the control and postincrement addressing modes are allowed. If DR
equals one, the control alterable and predecrement addressing modes are allowed. If the
effective address field of the operation word is not valid for the selected multiple register
transfer, the main processor writes an abort to the control CIR (before reading the register
select CIR) and takes an F-line trap.
For the control and postincrement addressing modes, the registers are transferred using
ascending addresses. For the postincrement addressing mode, the address register is
incremented by the length value after each register is transferred. Thus, the final value of
the address register is the initial value plus the total number of bytes transferred during
the primitive execution.
For the predecrement addressing mode, the operands are written to memory with de-
scending addresses, but the bytes within each operand are written to memory with as-
cending addresses. For example, Figure 7-12 illustrates the transfer of two floating-point
data registers to a stack, using the -(An) addressing mode. The designated stack pointer
is decremented by 12 bytes before the transfer of each register. Then the bytes within each
register are written to memory with ascending addresses. Thus, the address register is
decremented by the total number of bytes transferred by the end of the primitive execution.
7.4.2.5 TAKE PRE-INSTRUCTION EXCEPTION PRIMITIVE. Take exception primitives are
used by the FPCP to instruct the main processor to abort the current operation and initiate
exception processing. The main processor services these requests by writing an exception
acknowledge to the control CIR (which clears the pending exception in the FPCP), by
creating the appropriate stack frame on the currently active supervisor stack, and by be-
ginning execution of an exception handler. The exception handler is located by using the
vector number that is supplied as part of the take exception primitive. Table 7-6 lists the
vector numbers used by the FPCP.
Note that the MC68881 returns one of these primitives only once during the instruction
dialog. When an exception acknowledge is written to the control CIR, the take exception
primitive is discarded by the MC68881, and the response encoding is changed to the null
primitive. By doing this, the MC68881 assures that the take exception request is received
31
B
An - 24
FINAL An
An-12
INITIAL
An
/_
MS8. WRITTEN FIRST
FP1. WRIT~N LAST
13E WRrF~ LAST
MSB, wRrrrEN FIRST
FPO. WRfTrEN FIRST
WR~TE~ LAST
TOP OF STACK BEFORE REGtS'~R TRANSFER
Figure 7-12. Transfer Multiple Floating-Point Data Register to Stack Example
FREESCALE
7-16
MC68881/MC68882 USER'S MANUAL