This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: how to implement general macro-insn expansion?
Greg McGary writes:
> I stared at the code some more, and I think I understand it better
> now. rtl-c.scm is a toolkit for making builders. Having a "builder
> for each real insn" is what I want to do.
I _think_ that's the way to go.
As you get into it feel free to change your mind. :-)
> Here's another comment from minsn.scm:
>
> ; Expansion:
> ; If the macro expands to a string, arguments in the input string
> ; are refered to with %N.
>
> By %N, do you mean that %0, %1, %2 stand for first, second and third
> operands in the macro-insn's syntax string?
Yes. That was some playing around I did _really_ early on.
Ignore it unless there's a seed of something useful there.
> ; Multiple insns are separated with '\n'.
> ; String expansion is a special case of the normal form which is a Scheme
> ; expression that controls the expansion.
>
> Do you still want to support this? I'd rather just support the
> general scheme expansion.
Dunno. Feel free to ignore it for now.