
MOTOROLA
Chapter 5. Exceptions
5-31
Exception Definitions
5.5.7
Program Exception (0x00700)
The G2 core implements the program exception as it is defined by the PowerPC
architecture (OEA). A program exception occurs when no higher priority exception exists
and one or more of the exception conditions defined in the OEA occur.
When a program exception is taken, instruction execution for the handler begins at offset
0x00700 from the physical base address indicated by MSR[IP]. The exception conditions
are as follows:
Floating-point enabled exception—These exceptions correspond to IEEE-defined
exception conditions, such as overflows, and divide by zeros that may occur during
the execution of a floating-point arithmetic instruction. As a group, these exceptions
are enabled by the FE0 and FE1 bits in the MSR. Individual conditions are enabled
by specific bits in the FPSCR. For general information about this exception, see the
Programming Environments Manual
. For more information about how these
exceptions are implemented in the G2 core, see Section 5.5.7.1, “IEEE
Floating-Point Exception Program Exceptions.”
Illegal instruction—An illegal instruction program exception is generated when
execution of an instruction is attempted with an illegal opcode or illegal combination
of opcode and extended opcode fields (including PowerPC instructions not
implemented in the G2 core). These do not include those optional instructions
treated as no-ops.
Privileged instruction—A privileged instruction type program exception is
generated when the execution of a privileged instruction is attempted and the MSR
register user privilege bit, MSR[PR], is set. In the G2 core, this exception is
generated for
mtspr
or
mfspr
with an invalid SPR field if SPR[0] = 1 and
MSR[PR] = 1. This may not be true for all processors that implement the PowerPC
architecture.
Trap—A trap type program exception is generated when any of the conditions
specified in a trap instruction is met.
5.5.7.1
IEEE Floating-Point Exception Program Exceptions
Floating-point exceptions are signaled by condition bits set in the floating-point status and
control register (FPSCR). They can cause the system floating-point enabled exception
handler to be invoked. The G2 core handles all floating-point exceptions precisely. The G2
core implements the FPSCR as it is defined by the PowerPC architecture; for more
information about the FPSCR, see the
Programming Environments Manual
.
Floating-point operations that change exception sticky bits in the FPSCR may suffer a
performance penalty. When an exception is disabled in the FPSCR and MSR[FE] = 0,
updates to the FPSCR exception sticky bits are serialized at the completion stage. This
serialization may result in a one- or two-cycle execution delay. The penalty is incurred only
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.