Conditional moves test the flags which have been set by a previous instruction. If the given condition is true, the source operand is transferred (copied) into the destination operand.
These instructions can move a 16- or 32-bit value from memory to a general-purpose register or from one general-purpose register to another. Conditional moves of 8-bit register operands are not supported.
Note The CMOVcc instructions are new for the Pentium Pro processor family; however, they may not be supported by all the processors in the family. By checking the processor's feature information with CPUID, a program can determine if the CPU supports CMOVcc.
A condition code (cc) is associated with each instruction to indicate the condition being tested for. The terms "above" and "below" are used for un-signed integers; "less" and "greater" for signed integers. Note that several mnemonics have the same meaning.
Instruction Move if ... Flags CMOVA, CMOVNBE Above, Not Below or Equal CF=0 AND ZF=0 CMOVAE, CMOVNB, Above or Equal, Not Below, CMOVNC Not Carry CF=0 CMOVBE, CMOVNA Below or Equal, Not Above CF=1 OR ZF=1 CMOVB, CMOVC, Below, Carry, CMOVNAE Not Above or Equal CF=1 CMOVE, CMOVZ Equal, Zero ZF=1 CMOVNE, CMOVNZ Not Equal, Not Zero ZF=0 CMOVP, CMOVPE Parity, Parity Even PF=1 CMOVNP, CMOVPO No Parity, Parity Odd PF=0
CMOVG, CMOVNLE Greater, Not Less or Equal SF=OF AND ZF=0 CMOVGE, CMOVNL Greater or Equal, Not Less SF=OF CMOVLE, CMOVNG Less or Equal, Not Greater SF<>OF OR ZF=1 CMOVL, CMOVNGE Less, Not Greater or Equal SF<>OF CMOVO Overflow OF=1 CMOVNO No Overflow OF=0 CMOVS Sign (negative) SF=1 CMOVNS No Sign (positive) SF=0