This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: PATCH: string-expansion macros
- To: Greg McGary <greg at mcgary dot org>
- Subject: Re: PATCH: string-expansion macros
- From: Doug Evans <dje at transmeta dot com>
- Date: Mon, 16 Apr 2001 13:18:25 -0700 (PDT)
- Cc: fche at redhat dot com (Frank Ch. Eigler), cgen at sourceware dot cygnus dot com
- References: <200103022358.QAA31874.cygnus.local.cgen@kayak.mcgary.org><o5k84k3aca.fsf@toenail.toronto.redhat.com><ms8zl0r4zs.fsf@mcgary.org>
Greg McGary writes:
> fche@redhat.com (Frank Ch. Eigler) writes:
>
> > : I'd like to know why the old code tried to match macros before hard
> > : insns? The reason I need to try hard insns before macros is that for
> > : my MIPS-like port, string macros catch cases that can't be handled by
> > : one insn, and implement a "virtual insn" that do things in 2 or 3 hard
> > : insns. [...]
> >
> > Yes, this makes sense in most cases, but methinks there are other
> > opposite cases also.
>
> Can you think of an example?
One way I think of macro insns is as being intercepts/wrappers
for real insns. If you don't do the intercepts first, you ain't
gonna get the effect you want.
I think that's the way things should work,
and I wonder if needing to reverse it reveals a problem that
is best solved differently.
Note that macros were originally intended to support emitting
code rather than doing text transformation.