4.11.11 Write Memory Barrier

Format:

WMB

!Memory format

Operation:

{Guarantee that

{All preceding

{regions are

{that access

{All preceding

{regions are

{that access

stores that access memory-like ordered before any subsequent stores memory-like regions and

stores that access non-memory-like ordered before any subsequent stores non-memory-like regions.

Exceptions:

None

Instruction mnemonics:

WMB

Write Memory Barrier

Qualifiers:

None

Description:

The WMB instruction provides a way for software to control write buffers. It guarantees that writes preceding the WMB are not aggregated with writes that follow the WMB.

WMB guarantees that writes to memory-like regions that precede the WMB are ordered before writes to memory-like regions that follow the WMB. Similarly, WMB guarantees that writes to non-memory-like regions that precede the WMB are ordered before writes to non-mem- ory-like regions that follow the WMB. It does not order writes to memory-like regions relative to writes to non-memory-like regions.

WMB causes writes that are contained in buffers to be completed without unnecessary delay. It is particularly suited for batching writes to high-performance I/O devices.

WMB prevents writes that precede the WMB from being merged with writes that follow the WMB. In particular, two writes that access the same location and are separated by a WMB cause two distinct and ordered write events.

In the absence of a WMB (or IMB or MB) instruction, stores to memory-like or non-mem- ory-like regions can be aggregated and/or buffered and completed in any order.

Instruction Descriptions 4–147

Page 203
Image 203
Compaq ECQD2KCTE manual Write Memory Barrier, Wmb