This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: SH: use register names instead of numbers
- To: zackw at Stanford dot EDU (Zack Weinberg)
- Subject: Re: SH: use register names instead of numbers
- From: Joern Rennecke <amylaar at redhat dot com>
- Date: Wed, 22 Nov 2000 00:48:32 +0000 (GMT)
- Cc: amylaar at redhat dot com (Joern Rennecke), rth at redhat dot com (Richard Henderson), aoliva at redhat dot com (Alexandre Oliva), gcc-patches at gcc dot gnu dot org
> This looks good to me. I'm wondering why you parsed the expression by
> hand instead of creating a new DEFINE_CONSTANTS RTL code, as is done
> for all other define_* expressions.
This is not supposed to be returned from read_rtx, but rather immediately
affect all following rtx expressions that are read.
Moreover, proper checking for duplicate definitions is only possible if
you switch off constant expansion during constant definition.
> As a separate patch, I think it'd be a good idea to split the md-file
> reader out of rtl.c. It could go either in gensupport.c or a new
> read-rtl.c. The compiler proper doesn't use it, so it's just wasting
> space there. Not much space at the moment, but when we do a complete
> macro preprocessor with support for include files and conditional
> blocks, it'll get bigger.
I don't see a need for that. Well, maybe you can provide one, along with
a patch to fill it ;-)
> ... reduceS legibility ...
Thanks.
> > + To overcome these problems, the @code{define_constants} built-in
> > + is provided. It contains a vector of name-value pairs.
>
> This paragraph isn't very detailed and doesn't match the style of the
> rest of the document. I suggest instead
>
> To overcome this problem, you may use the @code{define_constants}
> expression. It contains a vector of name-value pairs. From that
> point on, wherever any of the names appears in the MD file, it is as
> if the corresponding value had been written instead. You may use
> @code{define_constants} multiple times; each appearance adds more
> constants to the table. It is an error to redefine a constant with
> a different value.
That's fine with me.
I'm waiting for someone with approval powers to voice a verdict...