Loading...
Exception Processing
MOTOROLA
M68060 USER’S MANUAL
8-19
8.4 RETURN FROM EXCEPTIONS
Once the processor has completed processing of all exceptions, it must restore the machine
context at the time of the initial exception before returning control to the original process.
Since the MC68060 is a complete restart machine, when the processor executes an RTE
instruction, only three fields are referenced. The stack format is accessed (SP+6) and the
frame type is first verified. If the format indicates an invalid type, a format error exception is
signaled. Otherwise, the processor accesses the SR (SP) and PC (SP+2) fields from the top
of the supervisor stack. If the PC value defines an odd address (least significant address bit
is set), then an address error exception is signaled. Note that for the format error or the
address error, the new stack frame will contain the SR value at the time the RTE’s execution
began, i.e., the SR has not been corrupted by the execution of the RTE. For either fault, the
PC is the logical address of the RTE instruction.
Given a valid stack format and a nonfaulting PC, the SR and PC are loaded with the stack
operands, the SSP adjusted by the appropriate value determined by the format field, and
control passed to the location defined by the new PC.
When the processor writes or reads a stack frame, it uses long-word operand transfers
wherever possible. Using a long-word-aligned SP enhances exception processing perfor-
mance. The processor does not necessarily read or write the stack frame data in sequential
order. The following paragraphs discuss in detail each stack frame format.
Note that unlike any of the previous M68000 processors, the MC68060 RTE instruction
treats the access error frame no differently from other frames.
8.4.1 Four-Word Stack Frame (Format $0)
If a four-word stack frame is on the stack and an RTE instruction is encountered, the pro-
cessor updates the SR and PC with the data read from the stack, increments the stack
pointer by eight, and resumes normal instruction execution
Stack Frames Exception Types Stacked PC Points To
• Interrupt
Format Error
TRAP #N
Illegal Instruction
A-Line Instruction
F-Line Instruction
Privilege Violation
Floating-Point Pre-Instruction
Unimplemented Integer
Unimplemented Effective Ad-
dress
Next Instruction
RTE or FRESTORE Instruc-
tion
Next Instruction
Illegal Instruction
A-Line Instruction
F-Line Instruction
First Word of Instruction
Causing Privilege Violation
Floating-Point Instruction
Unimplemented Integer In-
struction
Instruction That Used the Un-
implemented Effective Ad-
dress
STATUS REGISTER
PROGRAM COUNTER
0 0 0 0 VECTOR OFFSET
015
SP
+$02
+$06
FOUR-WORD STACK FRAME–FORMAT $0
Loading...
Terms of Use | Privacy Policy | DMCA Policy
2006-2020 Rsmanuals.com