cmov and movnti in gcc

Tommy Vercetti vercetti@zlew.org
Wed Jan 19 15:26:00 GMT 2005


Hello folks

Is gcc able to generate code for amd64/6x86 using cmov?
like:
if ( some == 16 ) {
	other = 1;
} 
else {
	other = 2;
}

should become :

cmp		eax, 0x10
cmovz	ebx, 0x01
cmovnz	ebx, 0x02

that's using intel notation.

Also, if variable is stored somewhere in memory (amd64 specyfic I guess), is 
it capable of using movnti instruction, which does not store the value in CPU 
cache.

thanks
-- 
Vercetti



More information about the Gcc mailing list