
User’s Manual
IBM PowerPC 750GX and 750GL RISC Microprocessor
2.3.4.7 Memory SynchronizationMemory synchronization instructions control the order in which memory operations are completed with respect to asynchronous events, and the order in which memory operations are seen by other processors or
Table
Name | Mnemonic | Syntax | Implementation Notes |
|
|
|
|
|
|
|
|
Load Word and | lwarx | rD,rA,rB | Programmers can use lwarx with stwcx. to emulate common semaphore operations such |
Reserve | as test and set, compare and swap, exchange memory, and fetch and add. Both instructions | ||
Indexed |
|
| must use the same EA. Reservation granularity is |
|
|
| makes reservations on behalf of aligned |
|
|
| |
|
|
| the W bit is set, executing lwarx and stwcx. to a page marked |
|
|
| a DSI exception, but DSI exceptions can result for other reasons. If the location is not word- |
Store Word | stwcx. | rS,rA,rB | aligned, an alignment exception occurs. |
Conditional | The stwcx. instruction is the only load/store instruction with a valid form if Rc is set. If Rc is | ||
Indexed |
|
| zero, executing stwcx. sets CR0 to an undefined value. In general, stwcx. always causes a |
|
|
| transaction on the external bus and thus operates with slightly worse performance character- |
|
|
| istics than normal store operations. |
|
|
|
|
|
|
| Because it delays subsequent instructions until all previous instructions complete to where |
|
|
| they cannot cause an exception, sync is a barrier against store gathering. Additionally, all |
|
|
| load/store cache/bus activities initiated by prior instructions are completed. Touch load oper- |
Synchronize | sync | — | ations (dcbt, dcbtst) must complete address translation, but need not complete on the bus. |
|
|
| If HID0[ABE] = '1', the sync instruction completes after a successful broadcast. |
|
|
| The latency of sync depends on the processor state when it is dispatched and on various |
|
|
| |
|
|
|
|
System designs with an L2 cache should take special care to recognize the hardware signaling caused by a sync bus operation and perform the appropriate actions to guarantee that memory references that can be queued internally to the L2 cache have been performed globally.
See Section 2.3.5.2, Memory Synchronization
In the PowerPC Architecture, the Rc bit must be zero for most
The PowerPC virtual environment architecture (VEA) describes the semantics of the memory model that can be assumed by software processes, and includes descriptions of the cache model,
This section describes additional instructions that are provided by the VEA.
2.3.5.1 Processor ControlIn addition to the
gx_02.fm.(1.2) | Programming Model |
March 27, 2006 | Page 113 of 377 |