This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: more than 10 operands in `asm'


> Syntax: Names are optional, and consist of the symbol characters up to
> the colon in an asm constraint string.  Named operands are referenced by
> %{[A-Za-z_0-9]+}.  A name may duplicated in multiple constraints: that
> means the same as a number does now (that the operand is shared between
> input and output).

That's far to complicated for reload to operate on.  It would have to
be translated into something simpler in an earlier stage, e.g. in
expand_asm and/or expand_asm_operands.

> I'm not clear what Joern Rennecke means by:
> > It would also raise the question how to quote a literal {.  Note that
> > { ... } nesting is used for assembler dialects.
> 
> Isn't a literal `{' simply itself, not preceded by `%'?
> Or does `%{' already mean something for some targets?

If the target port defines ASSEMBLER_DIALECT,  '{' means the start of
a dialect-dependent part of the output template.
There is no general meaning for '%{', but it can be defined within
PRINT_OPERAND when PRINT_OPERAND_PUNCT_VALID_P is true for '{' , and
it would be the obvious choice to quote '{' .

Note that the language used in an asm is pretty much the same as in
md output templates.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]