![](http://datasheet.mmic.net.cn/380000/-PD98501_datasheet_16745028/-PD98501_188.png)
CHAPTER 2 V
R
4120A
188
Preliminary User’s Manual S14767EJ1V0UM00
2.6.4.11 Breakpoint exception
(1) Cause
A Breakpoint exception occurs when an attempt is made to execute the BREAK instruction. This exception is not
maskable.
(2) Processing
The common exception vector is used for this exception, and the Bp code in the ExcCode field of the Cause
register is set.
When the MIPS16 instruction is disabled, the EPC register contains the address of the instruction that caused the
exception. However, if this instruction is in a branch delay slot, the EPC register contains the address of the
preceding jump or branch instruction, and the BD bit of the Cause register is set to 1.
When the MIPS16 instruction is enabled, the EPC register contains the address of the instruction that caused the
exception, and the least significant bit stores the ISA mode in which an exception occurs. However, if this
instruction is in a branch delay slot or is the instruction following the Extend instruction, the EPC register contains
the address of the preceding jump or Extend instruction, and the BD bit of the Cause register is set to 1; otherwise
this bit is cleared.
(3) Servicing
When the Breakpoint exception occurs, control is transferred to the applicable system routine. Additional
distinctions can be made by analyzing the unused bits of the BREAK instruction (bits 25 to 6), and loading the
contents of the instruction whose address the EPC register contains.
To resume execution, the EPC register must be altered so that the BREAK instruction does not re-execute; this is
accomplished by adding a value of 4 to the EPC register before returning.
When a Breakpoint exception occurs while executing the MIPS16 instruction, a value of 2 should be added to the
EPC register before returning.
If a BREAK instruction is in a branch delay slot, interpretation (decoding) of the branch instruction is required to
resume execution.