Re: 3 operands -- What order for AT&T syntax?



bwaichu@xxxxxxxxx wrote:
I have a three operand IMUL.  How do I order these in AT&T syntax?

Is it:

IMUL operand 3, operand 2, operand 1

?


Yes.

    imul $2, %ebx, %eax

assembles as

    6b c3 02                imul   $0x2,%ebx,%eax

and multiplies %ebx by 2 and store the result in %eax.

--
Thomas M. Sommers -- tms@xxxxxx -- AB2SB

.