Computer Chess Club Archives


Search

Terms

Messages

Subject: cmov isn't necessarily good

Author: Tom Kerrigan

Date: 12:16:27 07/18/03

Go up one level in this thread


On July 18, 2003 at 04:05:52, Walter Faxon wrote:

>>; 326  :     if (bbHalf) bb0 = bb1;              // will code as cmov (ideally)
>>
>>	test	ecx, ecx
>>	je	SHORT $L806
>>	mov	eax, DWORD PTR _bb$[esp]
>>$L806:
>>
>
>
>Stupid compiler, not only no cmov

IIRC, on the P6 (Pentium Pro, Pentium II, Pentium III), the cmov instruction
gets translated into a string of uOps that's equivalent to testing, branching,
and copying.

In other words, there is no performance benefit (I believe there may actually be
a performance penalty) to using cmov on a P6, and it breaks compatibility with
pre-P6 processors, so it's little wonder the P6-era MS compiler doesn't generate
cmovs.

-Tom



This page took 0.01 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.