Exception Processing - IBM PowerPC 604 User Manual

Risc
Table of Contents

Advertisement

Exception priorities are described in "Exception Priorities,'' in Chapter 6, "Exceptions," in
The Programming Environments Manual.
System reset and machine check exceptions may occur at any time and are not delayed even
if
an exception is being handled. As a result, state infonnation for the interrupted exception
may be lost; therefore, these exceptions are typically nonrecoverable.
All other exceptions have lower priority than system reset and machine check exceptions,
and the exception may not be taken immediately when it is recognized
If
an imprecise exception is not forced by either the context or the execution synchronizing
mechanism and
if
the instruction addressed by SRRO did not cause the exception then that
instruction appears not to have begun execution. For more infonnation on context-
synchronization, see Chapter 6, "Exceptions," in The Programming Environments Manual.
4.3 Exception Processing
When an exception is taken, the processor uses the save/restore registers, SRRO
and
SRRl,
to save the contents of the machine state register for user-level mode and to identify where
instruction execution should resume after the exception is handled.
When an exception occurs,
the
address saved in machine status save/restore register 0
(SRRO) is used
to
help calculate where instruction processing should resume when the
exception handler returns control to the interrupted process. Depending on the exception,
this may be
the
address
in
SRRO or at
the
next address
in
the program flow. All instructions
in the program flow preceding this one will have completed execution and no subsequent
instruction will have begun execution. This may be
the
address of
the
instruction that
caused
the
exception or the next one (as
in
the case of a system call or trap exception). The
SRRO register is shown in Figure 4-1.
SARO (holds EA for instruction in interrupted program flow)
0
Figure 4-1. Machine Status Save/Restore Register
o
SRRO is 32 bits wide in 32-bit implementations.
31
The save/restore register l(SRRl) is used to save machine status (selected bits from the
MSR and possibly other status bits as well) on exceptions and to restore those values when
rfi
is executed. SRRl is shown in Figure 4-2.
Exception-specific information and MSR bit values
0
31
Figure 4-2. Machine Status Save/Restore Register 1
4-6
PowerPC 604 RISC Microprocessor User's Manual

Advertisement

Table of Contents
loading

Table of Contents