Rev. 1.50, 10/04, page 72 of 448
5.5 Exception
Flow
5.5.1 Exception
Flow
Figure 5.1 shows an outline flowchart of the basic operations in instruction execution and
exception handling. For the sake of clarity, the following description assumes that instructions are
executed sequentially, one by one. Figure 5.1 shows the relative priority order of the different
kinds of exceptions (reset, general exception, and interrupt). Register settings in the event of an
exception are shown only for SSR, SPC, SGR, EXPEVT/INTEVT, SR, and PC. However, other
registers may be set automatically by hardware, depending on the exception. For details, see
section 5.6, Description of Exceptions. Also, see section 5.6.4, Priority Order with Multiple
Exceptions, for exception handling during execution of a delayed branch instruction and a delay
slot instruction, or in the case of instructions in which two data accesses are performed.
Execute next instruction
Is highest-
priority exception
re-exception
type?
Cancel instruction execution
result
Yes
Yes
Yes
No
No
No
No
Yes
SSR
←
SR
SPC
←
PC
SGR
←
R15
EXPEVT/INTEVT
←
exception code
SR.{MD,RB,BL}
←
111
SR.IMASK
←
received interuupt level (
*
)
PC
←
(CBCR.UBDE=1 && User_Break?
DBR: (VBR + Offset))
Interrupt
requested?
General
exception requested?
Reset
requested?
EXPEVT
←
exception code
SR. {MD, RB, BL, FD, IMASK}
←
11101111
PC
←
H'A000 0000
Note:
*
When the exception of the highest priority is an interrupt.
Whether IMASK is updated or not can be set by software.
Figure 5.1 Instruction Execution and Exception Handling
Summary of Contents for SuperH SH-4A
Page 2: ...Rev 1 50 10 04 page ii of xx ...
Page 8: ...Rev 1 50 10 04 page viii of xx ...
Page 116: ...Rev 1 50 10 04 page 96 of 448 ...
Page 178: ...Rev 1 50 10 04 page 158 of 448 ...
Page 206: ...Rev 1 50 10 04 page 186 of 448 ...
Page 231: ...Rev 1 50 10 04 page 211 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 235: ...Rev 1 50 10 04 page 215 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 238: ...Rev 1 50 10 04 page 218 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 408: ...Rev 1 50 10 04 page 388 of 448 Possible Exceptions Inexact Not generated when FPSCR PR 1 ...
Page 446: ...Rev 1 50 10 04 page 426 of 448 ...
Page 468: ...Rev 1 50 10 04 page 448 of 448 ...
Page 471: ......
Page 472: ...SH 4A Software Manual ...