I am reading about x86-64 (and assembly in general) through the book \"computer systems a programmer\'s perspective\"(3rd edition). The author, in compliance with other sour
Interestingly, gas seems to allow the following:
mov $20, %rax
mov $0, %rdx
mov $5, %rcx
idivq %rcx, %rax
ret
This is still performing the one operand division under the hood, but it LOOKS like two-operand form. As long as the first operand is a register and the second operand is specifically %rax, this works. However, in general idivq seems to require the one operand form.