This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: commutative asm operands
On Wed, Jul 31, 2002 at 11:44:25PM +0930, Alan Modra wrote:
> I was forwarded a testcase today containing some horrible asm
>
> asm ("addc %0, %2, %3\n\t"
> "adde %1, %4, %5"
> : "=r" (lo), "=r" (hi)
> : "%r" (__lo), "0" (lo), "%r" (__hi), "1" (hi))
>
> Note the use of "%" with "0"/"1" in the next operand. Is this legal?
Dunno. The x86 port does this the other way around -- puts
the % with the matching constraint. I.e.
: "%0" (lo), "r"(__lo)
r~