Author: Gunnar Andersson
Date: 06:44:03 11/08/99
Go up one level in this thread
On November 08, 1999 at 08:50:52, Dezhi Zhao wrote: >Hi > >I planed to use MMX instructions. However MMX is perhaps not very documented >well by Intel. I searched Intel site and only got a MMX instruction list. > >I inlined MMX instructions in a test program. However, the EMMS instruction >really bothered me. The VC6.0 compiler kept warning me that there should >be an EMMS _before_ the end of the function that contains MMX. > >As you said, EMMS is a slow instruction. It should be avoided whenever possible. >For short functions an EMMS would eat up all the gain from MMX instructions. >Just like other chess programmers, I use virtually no floating-point stuff >in engine thread. So my question is: >Could I do without EMMS instructions? Or could I leave EMMS in only a few >places, say just before engine thread exit point? I think this should suffice. What EMMS does is to clear some flag(s) that mark the MMX/floating-point registers as being used for MMX purposes. In another project - a fast DES implementation - using MMX assembler I only call the MMX instruction when I need to perform a floating-point instruction and it seems to work fine. This was using GCC 2.95 under Cygwin B20.1, it might be compiler-dependent. / Gunnar > >I worried if this simplication is safe for a multi-thread/process program >and the operation system. I am not sure it is safe for the user interaface >thread that is derived from MFC and may use folat instructions. > >Any suggestions? > >Dezhi Zhao
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.