
A CPU Instruction Set Details

SYNC
Description:
The SYNC instruction ensures that any loads and stores fetched prior to the present instruction are completed before any loads or stores after this instruction are allowed to start. Use of the SYNC instruction to serialize certain memory references may be required in a multiprocessor environment for proper synchronization. For example:![]()
The SYNC in processor A prevents DATA being written after FLAG, which could cause processor B to read stale data. The SYNC in processor B prevents DATA from being read before FLAG, which could likewise result in reading stale data. For processors which only execute loads and stores in order, with respect to shared memory, this instruction is a NOP.
LL and SC instructions implicitly perform a SYNC.
This instruction is allowed in User mode.
Exceptions:
None





Generated with CERN WebMaker
![]()