CMC

Complement Carry Flag

stableVMJITAOTinstruction

Encodings

OpcodeInstructionOp/En64-bitCompat/LegacyDescription
F5CMCZOValidValidComplement CF flag.

Measured cost

Loading measurements from arch-data...

Flags named

Description

Complements the CF flag in the EFLAGS register. CMC operation is the same in non-64-bit modes and 64-bit mode.

Operation

EFLAGS.CF[bit 0] := NOT EFLAGS.CF[bit 0];

Flags affected

The CF flag contains the complement of its original value. The OF, ZF, SF, AF, and PF flags are unaffected.

Exceptions

Real address mode
#UDIf the LOCK prefix is used.
Protected mode
#UDIf the LOCK prefix is used.
Virtual-8086 mode
#UDIf the LOCK prefix is used.
Compatibility mode
#UDIf the LOCK prefix is used.
64-bit mode
#UDIf the LOCK prefix is used.

Sources