English
Language : 

SH-2A Datasheet, PDF (43/501 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperH™ RISC engine Family
Section 3 Exception Handling
3.7.4 General Illegal Instructions
When undefined code located other than immediately after a delayed branch instruction (in a delay
slot) is decoded, general illegal instruction exception handling is started. Also, in the case of a
product that does not have an FPU, or if the FPU is in the module standby state, a floating-point
instruction or FPU-related instruction is treated as undefined code, and if located other than
immediately after a delayed branch instruction (in a delay slot), will cause general illegal
instruction exception handling to be started when decoded. In addition, if the product that does
not have a register bank, register bank-related instructions are treated as undefined code. If not
located immediately after a delayed branch instruction (in a delay slot), when decoded they will
cause slot illegal instruction handling to be started.
The CPU follows the same procedure as in the case of slot illegal instruction exception handling,
except that the PC value saved is the start address of the undefined code.
3.7.5 Integer Division Instructions
An integer division exception is generated if an integer division instruction executes division by
zero, or if the result of integer division overflows. Instructions that may cause a division-by-zero
exception are DIVU and DIVS. The only instruction that may cause an overflow exception is
DIVS, the exception being generated if the negative maximum value is divided by –1. CPU
operations in integer division exception handling are as follows.
1. The start address of the exception service routine corresponding to the integer division
exception is fetched from the exception handling vector table.
2. The status register (SR) is saved on the stack.
3. The program counter (PC) is saved on the stack. The saved PC value is the start address of the
integer division instruction that generated the exception.
4. Execution jumps to the address fetched from the exception handling vector table and program
execution commences. The jump is not a delayed branch.
3.7.6 Floating-Point Operation Instructions
An FPU exception is generated when the V, Z, O, U, or I bit in the enable field of the FPSCR
register is set. This indicates the occurrence of an invalid operation exception defined by the
IEEE754 standard, a division-by-zero exception, overflow (in the case of an instruction for which
this is possible), underflow (in the case of an instruction for which this is possible), or an
imprecision exception (in the case of an instruction for which this is possible).
Floating-point operation instructions that may cause an exception are as follows.
Rev. 3.00 Jul 08, 2005 page 29 of 484
REJ09B0051-0300