Re: GCC-Error: "More than 10 operands in asm"

From: Jamie Lokier (
Date: Wed May 03 2000 - 14:24:29 EST

Brian Gerst wrote:
> Try:
> asm volatile ("...."
> : "=a" (outEAX),
> "=b" (outEBX),
> "=c" (outECX),
> "=d" (outEDX),
> "=S" (outESI),
> "=D" (outEDI)
> : "0" (inEAX),
> "1" (inEBX),
> "2" (inECX),
> "3" (inEDX),
> "4" (inESI),
> "5" (inEDI)
> : "memory");
> If you use the same register for input and output, then use a number in
> the input section which corresponds to the position in the output
> section.

Won't work. There are still 12 operands, and GCC still has a hard-coded
limit of 10. [ Also, you're rather constraining the optimiser with
those hard register settings, and with so many fixed registers the
compiler may run out of registers trying to shuffle all the values into
the right registers. ]

The 10 is because the %digit syntax has never been extended to %digits.
There was a discussion on the egcs list many months ago about extending
this, perhaps to include names operands such as %{src}. But it didn't
get very far.

Try <> if you want to take this further.

-- Jamie

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:12 EST