
3-10
G2 PowerPC Core Reference Manual
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
Instruction Set Summary
3.2.2.4
Synchronization
The synchronization described in this section refers to the state of the core performing the
synchronization.
3.2.2.4.1
Context Synchronization
The System Call (
sc
) and Return from Interrupt (
rfi
) instructions perform context
synchronization by allowing previously issued instructions to complete before performing
a change in context. Execution of one of these instructions ensures the following:
No higher priority exception exists (
sc
).
All previous instructions have completed to a point where they can no longer cause
an exception. If a prior memory access instruction causes direct-store error
exceptions, the results are guaranteed to be determined before this instruction is
executed.
Previous instructions complete execution in the context (privilege, protection, and
address translation) under which they were issued.
The instructions following the
sc
or
rfi
instruction execute in the context established
by these instructions.
3.2.2.4.2
Execution Synchronization
An instruction is execution synchronizing if all previously initiated instructions appear to
have completed before the instruction is initiated or, in the case of the Synchronize (
sync
)
and Instruction Synchronize (
isync
) instructions, before the instruction completes. For
example, the Move to Machine State Register (
mtmsr
) instruction is execution
synchronizing. It ensures that all preceding instructions have completed execution and will
not cause an exception before the instruction executes but does not ensure subsequent
instructions execute in the newly established environment. For example, if the
mtmsr
sets
MSR[PR], unless an
isync
immediately follows the
mtmsr
instruction, a privileged
instruction could be executed or privileged access could be performed without causing an
exception even though MSR[PR] indicates user mode.
3.2.2.4.3
Instruction-Related Exceptions
There are two kinds of exceptions in the G2 core—those caused directly by the execution
of an instruction and those caused by an asynchronous event. Either may cause components
of the system software to be invoked.
Exceptions can be caused directly by the execution of an instruction as follows:
An attempt to execute an illegal instruction causes the illegal instruction (program
exception) handler to be invoked. An attempt by a user-level program to execute the
supervisor-level instructions listed below causes the privileged instruction (program
F
Freescale Semiconductor, Inc.
n
.