
RCPU
REFERENCE MANUAL
ADDRESSING MODES AND INSTRUCTION SET SUMMARY
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
4-67
When an
lwarx
instruction is executed, the load/store unit issues a cycle to the
load/store bus with a special attribute.
In case of an external memory access, this attribute causes the external bus inter-
face (EBI) to set a storage reservation on the cycle address. The EBI must either
snoop the external bus or receive some indication from external snoop logic in case
the storage reservation is broken by some other processor accessing the same lo-
cation. When an
stwcx.
instruction to external memory is executed, the EBI checks
if the reservation was lost. If so, the cycle is blocked from going to the external bus,
and the EBI notifies the LSU that the
stwcx.
instruction did not complete.
The RCPU memory synchronization instructions are summarized in
Table 4-34
.
Table 4-34 Memory Synchronization Instructions
Name
Mnemonic
Operand
Syntax
Operation
Enforce In-
Order
Execution of
I/O
eieio
—
The
eieio
instruction provides an ordering function for the effects of
load and store instructions executed by a given processor. Executing
an
eieio
instruction ensures that all memory accesses previously
initiated by the given processor are complete with respect to main
memory before allowing any memory accesses subsequently initiated
by the given processor to access main memory.
Instruction
Synchronize
isync
—
This instruction causes instruction fetch to be halted until all
instructions currently in the processor have completed execution, i.e.,
all issued instructions as well as the pre-fetched instructions waiting to
be issued.
This instruction has no effect on other processors or on their caches.
Load Word
and
Reserve
Indexed
lwarx
r
D
,r
A
,r
B
The effective address is the sum (
r
A|0) + (
r
B). The word in memory
addressed by the EA is loaded into register
r
D.
This instruction creates a reservation for use by an
stwcx.
instruction.
An address computed from the EA is associated with the reservation,
and replaces any address previously associated with the reservation.
The EA must be a multiple of four. If it is not, the alignment exception
handler is invoked.
Store Word
Conditional
Indexed
stwcx
.
r
S
,r
A
,r
B
The effective address is the sum (
r
A|0) + (
r
B).
If a reservation exists, register
r
S is stored into the word in memory
addressed by the EA and the reservation is cleared.
If a reservation does not exist, the instruction completes without
altering memory.
The EQ bit in the condition register field CR0 is modified to reflect
whether the store operation was performed (i.e., whether a reservation
existed when the
stwcx.
instruction began execution). If the store was
completed successfully, the EQ bit is set to one.
The EA must be a multiple of four; otherwise, the alignment exception
handler is invoked.
F
Freescale Semiconductor, Inc.
n
.