The PowerPC instruction, sync, ensures that all previous instructions have completed before the next instruction is initiated.
The POWER instruction, dcs, causes the processor to wait until all data cache lines have been written.
The PowerPC instruction, sync, provides an ordering function that ensures that all instructions initiated prior to the sync instruction complete, and that no subsequent instructions initiate until after the sync instruction completes. When the sync instruction completes, all storage accesses initiated prior to the sync instruction are complete.
Note: The sync instruction takes a significant amount of time to complete. The eieio (Enforce In-order Execution of I/O) instruction is more appropriate for cases where the only requirement is to control the order of storage references to I/O devices.
The POWER instruction, dcs, causes the processor to wait until all data cache lines being written or scheduled for writing to main memory have finished writing.
The dcs and sync instructions have one syntax form and do not affect the Fixed-Point Exception Register. If the Record (Rc) bit is set to 1, the instruction form is invalid.
The following code makes the processor wait until the result of the dcbf instruction is written into main memory:
# Assume that GPR 4 holds 0x0000 3000. dcbf 1,4 sync # Wait for memory to be updated.
The eieio (Enforce In-order Execution of I/O) instruction.
Processing and Storage