public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [patch] asms with more than 10 operands
       [not found] <199803301403.QAA18105@halles.ilog.fr>
@ 1998-04-05 21:29 ` Jeffrey A Law
  1998-04-06 17:35   ` Richard Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Jeffrey A Law @ 1998-04-05 21:29 UTC (permalink / raw)
  To: Bruno Haible; +Cc: egcs, wilson

  In message <199803301403.QAA18105@halles.ilog.fr>you write:
  > Here is an updated version of my patch from 5 March 1998.
  > 
  > 
  > In a recent projects, I had big problems with some asm code on Sparc which
  > used about 12 asm arguments. The hard limit of 10 asm arguments (counting
  > in-out registers twice!) is very bad. Geoffrey Keating stumbled upon the
  > same limitation on PowerPC. Can you please put this into egcs,
  > so that people can use "CFLAGS += -DMAX_RECOG_OPERANDS=20" when they see
  > need for it? Thanks.
First, don't send patches to people directly.  Send them to the list
you have a better chance of getting them reviewed that way :-)


  > Mon Mar 30 02:35:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsr
  > uhe.de>
  > 
  >         * genconfig.c (main): Make MAX_RECOG_OPERANDS customizable.
  >         * regmove.c (find_matches): Accept multi-digit constraints.
  >         * reload.c (find_reloads): Likewise.
  >         * stmt.c (expand_asm_operands): Likewise.
  >         * sparc.h (MAX_RECOG_OPERANDS): Define.
Won't some of your changes (like those in stmt.c) read %12 as operand
12 and advance the char pointer beyond the '2', regardless of the
value of MAX_RECOG_OPERANDS?

I don't generally like the idea of allowing ports to redefine
MAX_RECOG_OPERANDS.

I'd be willing to increase MAX_RECOG_OPERANDS to 20 unconditionally
if we can make sure that various ports don't expect %[letter]12 to mean
"output operand 1, followed by the character '2').

I'd also be willing to redefine how %[letter][digits] works -- I find
it rather odd and fragile that the compiler assumes that only the first
digit will be the operand number and following digits are to be output
verbatim.Your changes make this situation worse (IMHO) because they
make the grammar more ambigious.

I wouldn't mind defining it to mean all the digits are part of the
operand number, specifying a number larger than MAX_OPERANDS is an
error.  To output a numeric literal after an operand would require
either an escape or something similar.

So, I'm happy with the general idea of allowing more than 10 operands;
I'm a little worried about the implementation though...

jeff

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] asms with more than 10 operands
  1998-04-05 21:29 ` [patch] asms with more than 10 operands Jeffrey A Law
@ 1998-04-06 17:35   ` Richard Henderson
  1998-04-07 19:34     ` Joern Rennecke
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 1998-04-06 17:35 UTC (permalink / raw)
  To: law; +Cc: Bruno Haible, egcs, wilson

On Sun, Apr 05, 1998 at 05:26:35PM -0600, Jeffrey A Law wrote:
> I wouldn't mind defining it to mean all the digits are part of the
> operand number, specifying a number larger than MAX_OPERANDS is an
> error.

I would prefer to dispense with MAX_OPERANDS entirely.  I can think
of no good reason to have one.  Aside from new machines with more and
more registers, there have been occasions where I would have liked to
put a couple dozen struct offsets into the assembly with "i" constraints.

> To output a numeric literal after an operand would require
> either an escape or something similar.

You can split the string and use concatination ("%1""2"), just as
is required with the ISO \x sequence.


r~

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] asms with more than 10 operands
  1998-04-06 17:35   ` Richard Henderson
@ 1998-04-07 19:34     ` Joern Rennecke
  0 siblings, 0 replies; 3+ messages in thread
From: Joern Rennecke @ 1998-04-07 19:34 UTC (permalink / raw)
  To: rth; +Cc: law, haible, egcs, wilson

> You can split the string and use concatination ("%1""2"), just as
> is required with the ISO \x sequence.

No, that wouldn't work, since the substitution of %[0-9]* is done after the
concatenation.  Besides, this kind of string concatenation is not
available with old K&R compilers, thus we may not use it in gcc source.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-04-07 19:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <199803301403.QAA18105@halles.ilog.fr>
1998-04-05 21:29 ` [patch] asms with more than 10 operands Jeffrey A Law
1998-04-06 17:35   ` Richard Henderson
1998-04-07 19:34     ` Joern Rennecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).