Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

conditional move

An x86-64 instruction that copies a value only if a condition holds, letting code choose between two values without jumping.

cmovcc dest, src copies src to dest when condition code cc holds on the current flags; dest is still written (with its old value) when cc fails, and the 32-bit form zero-extends either way.

Examples

  • mov eax, edi; cmp edi, esi; cmovg eax, esi leaves the smaller of edi and esi in eax, with no branch.

Read the full section →