![](http://datasheet.mmic.net.cn/370000/-PD30101_datasheet_16680756/-PD30101_146.png)
CHAPTER 5 EXCEPTION PROCESSING
115
5.4.16 Integer Overflow Exception
Cause
An Integer Overflow exception occurs when an ADD, ADDI, SUB, DADD, DADDI or DSUB instruction
results in a 2’s complement overflow. This exception is not maskable.
Processing
The common exception vector is used for this exception, and the Ov code in the ExcCode field of the
Cause register is set.
The EPC register contains the address of the instruction that caused the exception unless the
instruction is in a branch delay slot, in which case the EPC register contains the address of the
preceding branch instruction and the BD bit of the Cause register is set to 1.
Servicing
At the time of the exception, the kernel reports the UNIX SIGFPE/FPE_INTOVF_TRAP (floating-point
exception/integer overflow) signal to the current process, but the exception is usually fatal.
5.4.17 Watch Exception
Cause
A Watch exception occurs when a load or store instruction references the physical address specified in
the WatchLo/WatchHi register. The WatchLo/WatchHi register specify whether a load or store or both
could have initiated this exception.
"
When the R bit of the WatchLo register is set to 1: Load instruction
"
When the W bit of the WatchLo register is set to 1: Store instruction
"
When both the R bit and W bit of the WatchLo register are set to 1: Load instruction or store
instruction
The CACHE instruction never causes a Watch exception.
The Watch exception is postponed if the EXL bit is set to 1 in the Status register, and Watch is only
maskable by setting the EXL bit to 1 in the Status register.
Processing
The common exception vector is used for this exception, and the WATCH code in the ExcCode field of
the Cause register is set.
The EPC register contains the address of the load or store instruction that caused the exception unless
it is in a branch delay slot, in which case the EPC register contains the address of the preceding branch
instruction and the BD bit of the Cause register is set to 1.
Servicing
The Watch exception is a debugging aid; typically the exception handler transfers control to a debugger,
allowing the user to examine the situation. To continue, the Watch exception must be disabled to
execute the faulting instruction. The Watch exception must then be reenabled. The faulting instruction
can be executed either by the debugger or by setting breakpoints.