This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: more than 10 operands in `asm'
- To: egcs at tantalophile dot demon dot co dot uk (Jamie Lokier)
- Subject: Re: more than 10 operands in `asm'
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Wed, 11 Nov 1998 02:00:02 +0000 (GMT)
- Cc: amylaar at cygnus dot co dot uk, law at cygnus dot com, dje at watson dot ibm dot com, kamil at dwd dot interkom dot pl, egcs at cygnus dot com
> 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.