![](http://datasheet.mmic.net.cn/370000/-PD30101_datasheet_16680756/-PD30101_118.png)
CHAPTER 5 EXCEPTION PROCESSING
87
5.2 PRECISION OF EXCEPTIONS
V
R
4101 exceptions are logically precise; the instruction that causes an exception and all those that
follow it are aborted and can be re-executed after servicing the exception. When succeeding
instructions are killed, exceptions associated with those instructions are also killed. Exceptions are not
taken in the order detected, but in instruction fetch order.
There is a special case in which the V
R
4101 processor may not be able to restart easily after servicing
an exception. When a cache data parity error exception occurs on a load with a cache hit, the V
R
4101
processor does not prevent the cache data (with erroneous parity) from being written back into the
register file during the WB stage. The exception is still precise, since both the EPC and CacheError
registers are updated with the correct virtual address pointing to the offending load instruction, and the
exception handler can still determine the cause of exception and its origin. The program can be
restarted by rewriting the destination register - not automatically, however, as in the case of all the other
precise exceptions where no status change occurs.
5.3 EXCEPTION PROCESSING REGISTERS
This section describes the CP0 registers that are used in exception processing. Table 5-1 lists these
registers, along with their number-each register has a unique identification number that is referred to as
its register number. The CP0 registers not listed in the table are used in memory management (see
Chapter 4 for details).
The exception handler examines the CP0 registers during exception processing to determine the cause
of the exception and the state of the CPU at the time the exception occurred.
The registers in Table 5-1 are used in exception processing, and are described in the sections that
follow.
Table 5-1. CP0 Exception Processing Registers
Register name
Register number
Context register
4
BadVAddr register
8
Count register
9
Compare register
11
Status register
12
Cause register
13
EPC register
14
WatchLo register
18
WatchHi register
19
XContext register
20
Parity Error register
26
Cache Error register
27
ErrorEPC register
30