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.

24594 Rev. 3.10 February 2005 AMD64 TechnologyWRMSRWrite to Model-Specific RegisterWrites data to 64-bit model-specific registers (MSRs). These registers are widely usedin performance-monitoring <strong>and</strong> debugging applications, as well as testability <strong>and</strong>program execution tracing.This instruction writes the contents of the EDX:EAX register pair into a 64-bit modelspecificregister specified in the ECX register. The 32 bits in the EDX register aremapped into the high-order bits of the model-specific register <strong>and</strong> the 32 bits in EAXform the low-order 32 bits.This instruction must be executed at a privilege level of 0 or a general protection fault#GP(0) will be raised. This exception is also generated if an attempt is made to specifya reserved or unimplemented model-specific register in ECX.WRMSR is a serializing instruction.The CPUID instruction can provide model information useful in determining theexistence of a particular MSR.See <strong>Volume</strong> 2, <strong>System</strong> Programming, for more information about model-specificregisters, machine check architecture, performance monitoring <strong>and</strong> debug registers.Mnemonic Opcode DescriptionWRMSR 0F 30 Write EDX:EAX to the MSR specified by ECX.Related <strong>Instructions</strong>RDMSRrFLAGS AffectedNoneWRMSR 373

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

Saved successfully!

Ooh no, something went wrong!