as: i386-Notes

1 
1 9.15.17 Notes
1 -------------
1 
1 There is some trickery concerning the 'mul' and 'imul' instructions that
1 deserves mention.  The 16-, 32-, 64- and 128-bit expanding multiplies
1 (base opcode '0xf6'; extension 4 for 'mul' and 5 for 'imul') can be
1 output only in the one operand form.  Thus, 'imul %ebx, %eax' does _not_
1 select the expanding multiply; the expanding multiply would clobber the
1 '%edx' register, and this would confuse 'gcc' output.  Use 'imul %ebx'
1 to get the 64-bit product in '%edx:%eax'.
1 
1    We have added a two operand form of 'imul' when the first operand is
1 an immediate mode expression and the second operand is a register.  This
1 is just a shorthand, so that, multiplying '%eax' by 69, for example, can
1 be done with 'imul $69, %eax' rather than 'imul $69, %eax, %eax'.
1