Disclaimer Information in this document is provided in connection with Intel products. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. Except as provided in Intel's Terms and Conditions of Sale for such products, Intel assumes no liability whatsoever, and Intel disclaims any express or implied warranty, relating to sale and/or use of Intel products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right. Intel products are not intended for use in medical, life saving, or life sustaining applications. Intel may make changes to specifications and product descriptions at any time, without notice. Copyright © Intel Corporation (1996). Third-party brands and names are the property of their respective owners. |
Guidelines for EMMS usage have been changed due to significant side effect delay on Pentium® II processor.
The Intel Architecture MMX Technology, Programmer's Reference Manual describes the EMMS instruction as follows,
"The EMMS instruction set the values of the floating-point (FP) tag word to empty (all ones). EMMS marks the registers as available, so they can subsequently be used by floating-point instructions.
If a floating-point instruction loads into one of the registers before it has been reset by the EMMS instruction, a floating-point stack overflow can occur, which results in an FP exception or incorrect result."
The previous guidelines for the EMMS instruction The Intel Architecture MMX Technology, Developer's Manual March 1996, section 4.4, EMMS Guidelines states,
: Always call the EMMS instruction at the end of your MMX code.
Since the MMX registers are aliased on the floating-point registers, it is very important to clear the MMX register before issuing a floating-point instruction. Use the EMMS instruction to clear the MMX register and set the value of the floating-point tag word (TW) to empty (that is, all ones). This instruction should be inserted at the end of all MMX code segments to avoid an overflow exception in the floating-point stack when a floating-point instruction is executed.
According to a recent study significant performance delay will occur on Pentium® II processor as a side effect of the EMMS instruction. Regardless of whether a FP instruction is executed. The side effect delay is incurred with the first MMX instruction encountered after the EMMS instruction.
The following guidelines are suggested for the use of the EMMS instruction,