cmovg

Pentium Pro and later

Move if greater (ZF == 0 and SF == OF)

cmovg reg16, r/m16 | cmovg reg32, r/m32 | cmovg reg64, r/m64 | cmovg reg16, reg16, r/m16 | cmovg reg32, reg32, r/m32 | cmovg reg64, reg64, r/m64

CMOV moves its source (second) operand into its destination (first) operand if the given condition code is satisfied; otherwise it does nothing.

For a list of condition codes, see the condition codes.

Although the CMOV instructions are flagged P6 and above, they may not be supported by all Pentium Pro processors; the CPUID instruction (CPUID) will return a bit which indicates whether conditional moves are supported.

Loading...

Forms

Every form of cmovg the assembler accepts.

FormSinceNotes
cmovg reg16, r/m16Pentium Pro
cmovg reg32, r/m32Pentium Pro
cmovg reg64, r/m64x86-64long
cmovg reg16, reg16, r/m16x86-64apxlong
cmovg reg32, reg32, r/m32x86-64apxlong
cmovg reg64, reg64, r/m64x86-64apxlong