
MOTOROLA
6-16
EXCEPTIONS
For More Information On This Product,
Go to: www.freescale.com
RCPU
REFERENCE MANUAL
MSR[16:31] are guaranteed to be written to SRR1 when the first instruction of the
exception handler is encountered.
6.8.1 Enabling and Disabling Exceptions
When a condition exists that causes an exception to be generated, the processor
must determine whether the exception is enabled for that condition.
Floating-point enabled exceptions (a type of program exception) can be dis-
abled by clearing both MSR[FE0] and MSR[FE1]. If either or both of these bits
are set, all floating-point exceptions are taken and cause a program excep-
tion. Bits in the FPSCR can enable and disable individual conditions that can
generate floating-point exceptions.
External and decrementer interrupts are enabled by setting the MSR[EE] bit.
When MSR[EE] = 0, recognition of these exception conditions is delayed.
MSR[EE] is cleared automatically when an exception is taken to delay recog-
nition of conditions causing those exceptions.
A machine check exception can only occur if the machine check enable bit,
MSR[ME], is set. If MSR[ME] is cleared, the processor goes directly into
checkstop state when a machine-check exception condition occurs.
System reset and non-maskable external breakpoint exceptions cannot be
masked.
Internal data and instruction breakpoints are specified as maskable or non-
maskable by the BRKNOMSK bit in LCTRL2.
Maskable internal (data and instruction) and external breakpoints are recog-
nized only when MSR[RI] = 1.
6.8.2 Steps for Exception Processing
After determining that the exception can be taken (by confirming that any instruc-
tion-caused exceptions occurring earlier in the instruction stream have been han-
dled, and by confirming that the exception is enabled for the exception condition),
the processor does the following:
1. Loads the machine status save/restore register 0 (SRR0) with an instruction
address that depends on the type of exception. See the individual exception
description for details about how this register is used for specific exceptions.
2. Loads SRR1[0:15] with information specific to the exception type.
3. Loads SRR1[16:31] with a copy of MSR[16:31].
4. Sets the MSR as described in
Table 6-9
. The new values take effect begin-
ning with the fetching of the first instruction of the exception-handler routine
located at the exception vector address.
Table 6-8 Floating-Point Exception Mode Bits
FE[0:1]
Mode
00
Floating-point exceptions disabled
01, 10, 11
Floating-point precise mode
F
Freescale Semiconductor, Inc.
n
.