Motorola CPU32 Reference Manual page 287

M68300 series central processor unit
Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

III
6.3.2.3 (Type II) Correcting Faults via RTE
Instructions aborted because of a type II fault are restarted upon return from the
exception handler. A fault handler must establish safe restart conditions. If a
fault is caused by a nonresident page in a demand-paged virtual memory
configuration, the fault address must be read from the stack, and the appropriate
page retrieved. An RTE instruction terminates the exception handler. After
unstacking the machine state, the instruction is refetched and restarted.
6.3.2.4 (Type III ) Correcting Faults via Software
Sufficient information is contained in the stack frame to complete MOVEM in
software. After the cause of the fault is corrected, the faulted bus cycle must be
rerun. Do the following to complete an instruction through software:
A. Setup for Rerun
Read the MOVEM opcode and extension from locations pointed to by stack
frame PC and PC
+
2. The effective address need not be recalculated, since
the next operand address is saved in the stack frame. However, the opcode
effective address field must be examined to determine how to update the
address register and program counter when the instruction is complete.
Adjust the mask to account for operands already transferred. Subtract the
stacked operand transfer count from 16 to obtain the number of operands
transferred. Scan the mask using this count value. Each time a set bit is
found, clear it and decrement the counter. When the count is zero, the mask
is ready for use.
Adjust the operand address.
If the predecrement addressing mode is in
effect, subtract the operand size from the stacked value; otherwise, add the
operand size to the stacked value.
B. Rerun Instruction
Scan the mask for set bits.
Read/write the selected register from/to the
operand address as each bit is found.
As each operand is transferred, clear the mask bit and increment
(decrement) the operand address. When all bits in the mask are cleared, all
operands have been transferred.
If the addressing mode is predecrement or postincrement, update the register
to complete the execution of the instruction.
MOTOROLA
6-24
EXCEPTION
PROCESSING
CPU32 REFERENCE MANUAL

Advertisement

Table of Contents
loading

Table of Contents