Instruction Model
PowerPC e500 Core Family Reference Manual, Rev. 1
Freescale Semiconductor
3-33
A specified memory location that may be modified by other processors or mechanisms requires
memory coherency. If the location is in write-through-required or caching-inhibited memory, the
implementation determines whether these instructions function correctly or cause the system data
storage error handler to be invoked. The e500 takes a data storage interrupt if the location is
write-through but does not take the interrupt if the location is caching inhibited.
Note the following:
•
The memory coherency required attribute on other processors and mechanisms ensures that
their stores to the specified location cause the reservation created by the lwarx to be
cancelled.
•
Warning: Support for load and reserve and store conditional instructions for which the
specified location is in caching-inhibited memory is being phased out of Book E. It is likely
not to be provided on future implementations. New programs should not use these
instructions to access caching inhibited memory.
A lwarx instruction is a load from a word-aligned location with the following side effects.
•
A reservation for a subsequent stwcx. instruction is created.
•
The memory coherency mechanism is notified that a reservation exists for the location
accessed by the lwarx.
The stwcx. is a store to a word-aligned location that is conditioned on the existence of the
reservation created by the lwarx and on whether both instructions specify the same location. To
emulate an atomic operation, both lwarx and stwcx. must access the same location. lwarx and
stwcx. are ordered by a dependence on the reservation, and the program is not required to insert
other instructions to maintain the order of memory accesses caused by these two instructions.
A stwcx. performs a store to the target location only if the location accessed by the lwarx that
established the reservation has not been stored into by another processor or mechanism between
supplying a value for the lwarx and storing the value supplied by the stwcx.. If the instructions
specify different locations, the store is not necessarily performed. CR0 is modified to indicate
whether the store was performed, as follows:
CR0[LT,GT,EQ,SO] = 0b00
||
store_performed
||
XER[SO]
If a stwcx. completes but does not perform the store because a reservation no longer exists, CR0
is modified to indicate that the stwcx. completed without altering memory.
A stwcx. that performs its store is said to succeed.
A successful stwcx. to a given location may complete before its store has been performed with
respect to other processors and mechanisms. As a result, a subsequent load or lwarx from the given
location on another processor may return a stale value. However, a subsequent lwarx from the
given location on the other processor followed by a successful stwcx. on that processor is
Содержание PowerPC e500 Core
Страница 1: ...PowerPC e500 Core Family Reference Manual Supports e500v1 e500v2 E500CORERM Rev 1 4 2005...
Страница 36: ...PowerPC e500 Core Family Reference Manual Rev 1 xxxvi Freescale Semiconductor...
Страница 38: ...PowerPC e500 Core Family Reference Manual Rev 1 Part I 2 Freescale Semiconductor...
Страница 316: ...PowerPC e500 Core Family Reference Manual Rev 1 7 18 Freescale Semiconductor Performance Monitor...
Страница 332: ...PowerPC e500 Core Family Reference Manual Rev 1 Part II 2 Freescale Semiconductor...
Страница 362: ...PowerPC e500 Core Family Reference Manual Rev 1 10 26 Freescale Semiconductor Auxiliary Processing Units APUs...
Страница 440: ...PowerPC e500 Core Family Reference Manual Rev 1 A 8 Freescale Semiconductor Programming Examples...
Страница 444: ...PowerPC e500 Core Family Reference Manual Rev 1 B 4 Freescale Semiconductor Guidelines for 32 Bit Book E...
Страница 530: ...Opcode Listings PowerPC e500 Core Family Reference Manual Rev 1 D 50 Freescale Semiconductor...
Страница 534: ...PowerPC e500 Core Family Reference Manual Rev 1 E 4 Freescale Semiconductor Revision History...