This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cmov and movnti in gcc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]