SH: use register names instead of numbers
Zack Weinberg
zackw@stanford.edu
Mon Nov 20 14:03:00 GMT 2000
On Sat, Nov 18, 2000 at 06:06:27AM -0200, Alexandre Oliva wrote:
> On Nov 17, 2000, Joern Rennecke <amylaar@redhat.com> wrote:
>
> > OTOH if we did the expansion in rtl.c, we'd get better error messages -
> > i.e. the context will be from the source file, not from some preprocessed
> > file.
>
> Agreed. It's definitely a better approach to the problem. The C
> preprocessor was not designed to preprocess lisp-like languages. I'd
> rather just drop this ill-conceived misfeature of the Makefile and do
> it right.
In this context, I'd like to point out that CGEN uses a modified RTL,
and it has a macro facility. It'd probably be wise to copy it instead
of inventing our own incompatible mechanism. It does not appear to
have conditional processing or file inclusion - yet. CGEN's written
in Scheme, but I don't think it'd be that hard to implement the macro
logic in gensupport.c.
For this specific problem, I'd like to see a construct like this:
(define_constants [
(foo 12)
(bar 23)
(baz 34)
...
])
You can have multiple instances, each one enlarges the table, it's an
error to redefine a constant with a different value. You could do
this with CGEN's macros but it'd be a lot more verbose.
zw
More information about the Gcc-patches
mailing list