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.

354 Chapter 17.<br />

Watch Exception<br />

Cause<br />

Processing<br />

Servicing<br />

A Watch exception occurs when a load or store instruction references the physical<br />

address specified in the WatchLo/WatchHi System Control Coprocessor (CP0)<br />

registers. The WatchLo register specifies whether a load or store initiated this<br />

exception.<br />

A Watch exception violates the rules of a precise exception in the following way:<br />

If the load or store reference which triggered the Watch exception has a cacheable<br />

address and misses in the data cache, the line will then be read from memory into<br />

the secondary cache if necessary, and refilled from the secondary cache into the<br />

data cache. In all other cases, cache state is not affected by an instruction which<br />

takes a Watch exception.<br />

The CACHE instruction never causes a Watch exception.<br />

The Watch exception is postponed if either the EXL or ERL bit is set in the Status<br />

register. If either bit is set, the instruction referencing the WatchLo/WatchHi<br />

address is executed and the exception is delayed until the delay condition is<br />

cleared; that is, until ERL and EXL both are cleared (set to 0). The EPC contains the<br />

address of the next unexecuted instruction.<br />

A delayed Watch exception is cleared by system reset or by writing a value to the<br />

WatchLo register. †<br />

Watch is maskable by setting the EXL or ERL bits in the Status register.<br />

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

Cause register is set.<br />

The Watch exception is a debugging aid; typically the exception handler transfers<br />

control to a debugger, allowing the user to examine the situation.<br />

To continue program execution, the Watch exception must be disabled to execute<br />

the faulting instruction. The Watch exception must then be reenabled. The<br />

faulting instruction can be executed either by interpretation or by setting<br />

breakpoints.<br />

† An MTC0 to the WatchLo register clears a delayed Watch exception.<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!