13.07.2015 Views

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

24594 Rev. 3.10 February 2005 AMD64 TechnologyMFENCEMemory FenceActs as a barrier to force strong memory ordering (serialization) between load <strong>and</strong>store instructions preceding the MFENCE, <strong>and</strong> load <strong>and</strong> store instructions that followthe MFENCE. A weakly-ordered memory system allows the hardware to reorder reads<strong>and</strong> writes between the processor <strong>and</strong> memory. The MFENCE instruction guaranteesthat the system completes all previous memory accesses before executing subsequentaccesses.The MFENCE instruction is weakly-ordered with respect to data <strong>and</strong> instructionprefetches. Speculative loads initiated by the processor, or specified explicitly usingcache-prefetch instructions, can be reordered around an MFENCE.In addition to load <strong>and</strong> store instructions, the MFENCE instruction is strongly orderedwith respect to other MFENCE instructions, LFENCE instructions, SFENCEinstructions, serializing instructions, <strong>and</strong> CLFLUSH instructions.Support for the MFENCE instruction is indicated when the SSE2 bit (bit 26) is set to 1in EDX after executing CPUID with st<strong>and</strong>ard function 1.Mnemonic Opcode DescriptionMFENCE 0F AE F0 Force strong ordering of (serialized) load <strong>and</strong> store operations.Related <strong>Instructions</strong>LFENCE, SFENCErFLAGS AffectedNoneExceptionsException RealVirtual8086 Protected Cause of ExceptionInvalid opcode, #UD X X X The MFENCE instruction is not supported as indicated by bit 26 ofCPUID st<strong>and</strong>ard function 1.MFENCE 191

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!