LFENCE
Usage: LFENCE Modifies Flags: None
Serializes load operations.
Load Fence
LFENCE ; 0F AE /5 [WILLAMETTE,SSE2]
LFENCE performs a serializing operation on all loads from memory that were issued before the LFENCE instruction. This guarantees that all memory reads before the LFENCE instruction are visible before any reads after the LFENCE instruction.
LFENCE is ordered respective to other LFENCE instruction, MFENCE, any memory read and any other serializing instruction (such as CPUID).
Weakly ordered memory types can be used to achieve higher processor performance through such techniques as out-of-order issue and speculative reads. The degree to which a consumer of data recognizes or knows that the data is weakly ordered varies among applications and may be unknown to the producer of this data. The LFENCE instruction provides a performance-efficient way of ensuring load ordering between routines that produce weakly-ordered results and routines that consume that data.
LFENCE uses the following ModRM encoding:
Mod (7:6) = 00_11_..._...
Reg/Opcode (5:3) = .._.._101_...
R/M (2:0) = .._.._..._000
All other ModRM encodings are defined to be reserved, and use of these encodings risks incompatibility with future processors.
See also SFENCE and MFENCE.
EXAMPLE:
lfence