DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(as.info) i386-Notes

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