
CPU32+
5-56
MC68360 USER’S MANUAL
MOTOROLA
exception frame on top of the stack, and resume execution at the exception handler
address.
5.5.4 CPU32+ Stack Frames
The CPU32+ generates three different stack frames: four-word frames, six-word frames,
and twelve-word bus error frames.
5.5.4.1 FOUR-WORD STACK FRAME.
This stack frame is created by interrupt, format
error, TRAP #n, illegal instruction, A-line and F-line emulator trap, and privilege violation
exceptions. Depending on the exception type, the PC value is either the address of the next
instruction to be executed or the address of the instruction that caused the exception (see
Figure 5-12).
5.5.4.2 SIX-WORD STACK FRAME.
This stack frame (see Figure 5-13) is created by
instruction-related traps, which include CHK, CHK2, TRAPcc, TRAPV, and divide-by-zero,
and by trace exceptions. The faulted instruction PC value is the address of the instruction
that caused the exception. The next PC value (the address to which RTE returns) is the
address of the next instruction to be executed.
Hardware breakpoints also utilize this format. The faulted instruction PC value is the address
of the instruction executing when the breakpoint was sensed. Usually this is the address of
the instruction that caused the breakpoint, but, because released writes can overlap follow-
ing instructions, the faulted instruction PC may point to an instruction following the instruc-
tion that caused the breakpoint. The address to which RTE returns is the address of the next
instruction to be executed.
5.5.4.3 BUS ERROR STACK FRAME.
This stack frame is created when a bus cycle fault
is detected. The CPU32+ bus error stack frame differs significantly from the equivalent stack
15
0
SP
STATUS REGISTER
+$02
PROGRAMCOUNTER HIGH
PROGRAMCOUNTER LOW
+$06
0
0
0
0
VECTOR OFFSET
Figure 5-12. Format $0—Four-Word Stack Frame
15
0
SP
STATUS REGISTER
+$02
NEXT INSTRUCTION PROGRAMCOUNTER HIGH
NEXT INSTRUCTION PROGRAMCOUNTER LOW
+$06
0
0
1
0
VECTOR OFFSET
+$08
FAULTED INSTRUCTION PROGRAMCOUNTER HIGH
FAULTED INSTRUCTION PROGRAMCOUNTER LOW
Figure 5-13. Format $2—Six-Word Stack Frame