Limited number of asm operands

Fergus Henderson fjh@cs.mu.oz.au
Fri Apr 27 04:46:00 GMT 2001


On 26-Apr-2001, Geoff Keating <geoffk@geoffk.org> wrote:
> Espen Skoglund <esk@ira.uka.de> writes:
> 
> > Is there a good reason why the number of asm operands is limited to
> > only 10 (apart from only being able to specify 10 operands [0-9] in
> > asm input constraints)?  This is terribly annoying when you're trying
> > to build highly optimized bindings to, e.g., special kernel
> > interfaces.  It also makes it more inconvenient to do things like passing
> > a high number of CPP defined constants into the asm construct.
> > 
> > The attached patch fixes these problems by allowing up to 30
> > asm inputs/outputs.
> 
> One reason is that we'd have to invent a new syntax, because with your patch
> %10 means something different to before.

Is that likely to be a problem in practice?
Are constructs like %10 used currently?

If this is really likely to be a significant backwards compatibility
problem, then I'd like to see a patch now that issued warnings for
such constructs, e.g.

	warning: behaviour of `%10' may change in future versions of gcc:
	in this version of gcc, %10 means first parameter followed by `0',
	but in future versions of gcc, %10 will mean 10th parameter

Then at some time later on we could fix the problem.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: < http://www.cs.mu.oz.au/~fjh >  |     -- the last words of T. S. Garp.



More information about the Gcc-patches mailing list