cqo

x86-64 and later

Convert Quadword to Octaword

cqo

Sign extends rax into rdx:rax, filling rdx with copies of the sign bit. idiv divides that 128 bit pair, so signed division is written as cqo then idiv; forgetting the cqo leaves whatever rdx happened to hold in the high half and the result is nonsense rather than an error.

Loading...

Forms

Every form of cqo the assembler accepts.

FormSinceNotes
cqo x86-64long