English
Language : 

SH7205 Datasheet, PDF (184/1904 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperHTM RISC engine Family / SH7200 Series
Section 6 Exception Handling
6.7.2 Trap Instruction
When a TRAPA instruction is executed, trap instruction exception handling starts. The CPU
operates as follows:
1. The exception service routine start address which corresponds to the vector number specified
in the TRAPA instruction is fetched from the exception handling vector table.
2. The status register (SR) is saved to the stack.
3. The program counter (PC) is saved to the stack. The PC value saved is the start address of the
instruction to be executed after the TRAPA instruction.
4. After jumping to the address fetched from the exception handling vector table, program
execution starts. The jump that occurs is not a delayed branch.
6.7.3 Slot Illegal Instructions
An instruction placed immediately after a delayed branch instruction is said to be placed in a delay
slot. When the instruction placed in the delay slot is undefined code, an instruction that rewrites
the PC, a 32-bit instruction, an RESBANK instruction, a DIVS instruction, or a DIVU instruction,
slot illegal exception handling starts when such kind of instruction is decoded. In slot illegal
instruction exception handling, the CPU operates as follows:
1. The exception service routine start address is fetched from the exception handling vector table.
2. The status register (SR) is saved to the stack.
3. The program counter (PC) is saved to the stack. The PC value saved is the jump address of the
delayed branch instruction immediately before the undefined code, the instruction that rewrites
the PC, the 32-bit instruction, the RESBANK instruction, the DIVS instruction, or the DIVU
instruction.
4. After jumping to the address fetched from the exception handling vector table, program
execution starts. The jump that occurs is not a delayed branch.
6.7.4 General Illegal Instructions
When an undefined code placed anywhere other than immediately after a delayed branch
instruction, i.e., in a delay slot, is decoded, general illegal instruction exception handling starts. In
general illegal instruction exception handling, the CPU handles general illegal instructions in the
same way as slot illegal instructions. Unlike processing of slot illegal instruction exception
handling, however, the program counter value stored is the start address of the undefined code.
Rev. 1.00 Mar. 25, 2008 Page 152 of 1868
REJ09B0372-0100