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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

AMD64 Technology 24594 Rev. 3.10 February 2005SFENCEStore FenceActs as a barrier to force strong memory ordering (serialization) between storeinstructions preceding the SFENCE <strong>and</strong> store instructions that follow the SFENCE. Aweakly-ordered memory system allows hardware to reorder reads <strong>and</strong> writes betweenthe processor <strong>and</strong> memory. The SFENCE instruction guarantees that the systemcompletes all previous stores before executing subsequent stores.The SFENCE instruction is weakly-ordered with respect to load instructions, data <strong>and</strong>instruction prefetches, <strong>and</strong> the LFENCE instruction. Speculative loads initiated bythe processor, or specified explicitly using cache-prefetch instructions, can bereordered around an SFENCE.In addition to store instructions, SFENCE is strongly ordered with respect to otherSFENCE instructions, MFENCE instructions, <strong>and</strong> serializing instructions.Support for the SFENCE instruction is indicated when the SSE bit (bit 25) is set to 1 inEDX after executing CPUID st<strong>and</strong>ard function 1.Mnemonic Opcode DescriptionSFENCE 0F AE F8 Force strong ordering of (serialized) store operations.Related <strong>Instructions</strong>LFENCE, MFENCErFLAGS AffectedNoneExceptionsException RealVirtual8086 Protected Cause of ExceptionInvalid Opcode, #UD X X X The SSE instructions are not supported, as indicated by EDX bit 25 ofCPUID st<strong>and</strong>ard function 1; <strong>and</strong> the AMD extensions to MMX are notsupported, as indicated by EDX bit 22 of CPUID extended function8000_0001h.270 SFENCE

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

Saved successfully!

Ooh no, something went wrong!