SH: use register names instead of numbers
Zack Weinberg
zackw@Stanford.EDU
Tue Nov 21 16:38:00 GMT 2000
On Wed, Nov 22, 2000 at 12:10:33AM +0000, Joern Rennecke wrote:
> > One, documentation needs to be added to md.texi. Two,
> >
> > > + hashtab.o: $(srcdir)/../libiberty/hashtab.c $(CONFIG_H)
> > > + rm -f hashtab.c
> > > + $(LN_S) $(srcdir)/../libiberty/hashtab.c hashtab.c
> > > + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) hashtab.c
> >
> > This needs to be using HOST_CC etc.
>
> Done. I have also resolved a few merge problems with the most recent
> fsf sources. Most notably, I had to put xcalloc into gensupport.c
> (libiberty/xmalloc.c has it, but it not only needs xexit, but also provides
> lots of functions that are already in gensupport.c .)
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.
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.
Doc nitpicks:
> + @section Constant Definitions
> + @cindex constant definitions
> + @findex define_constants
> +
> + Using literal constants inside instruction patterns reduced legibility and
... reduceS legibility ...
> + 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.
zw
More information about the Gcc-patches
mailing list