17.01.2013 Views

MIPS R10000 Microprocessor User's Manual - SGI TechPubs Library

MIPS R10000 Microprocessor User's Manual - SGI TechPubs Library

MIPS R10000 Microprocessor User's Manual - SGI TechPubs Library

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

350 Chapter 17.<br />

Breakpoint Exception<br />

Cause<br />

Processing<br />

Servicing<br />

A Breakpoint exception occurs when an attempt is made to execute the BREAK<br />

instruction. This exception is not maskable.<br />

The common exception vector is used for this exception, and the BP code in the<br />

Cause register is set.<br />

The EPC register contains the address of the BREAK instruction unless it is in a<br />

branch delay slot, in which case the EPC register contains the address of the<br />

preceding branch instruction.<br />

If the BREAK instruction is in a branch delay slot, the BD bit of the Status register<br />

is set, otherwise the bit is cleared.<br />

When the Breakpoint exception occurs, control is transferred to the applicable<br />

system routine. Additional distinctions can be made by analyzing the Code field of<br />

the BREAK instruction (bits 25:6), and loading the contents of the instruction<br />

whose address the EPC register contains. A value of 4 must be added to the<br />

contents of the EPC register (EPC register + 4) to locate the instruction if it resides<br />

in a branch delay slot.<br />

To resume execution, the EPC register must be altered so that the BREAK<br />

instruction does not re-execute; this is accomplished by adding a value of 4 to the<br />

EPC register (EPC register + 4) before returning.<br />

If a BREAK instruction is in a branch delay slot, interpretation of the branch<br />

instruction is required to resume execution.<br />

Version 2.0 of January 29, 1997 <strong>MIPS</strong> <strong>R10000</strong> <strong>Microprocessor</strong> <strong>User's</strong> <strong>Manual</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!