This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: how to implement general macro-insn expansion?


Greg McGary <greg@mcgary.org> writes:

> ; Another thing to do is have a builder for each real insn so instead of
> ; expanding to text, the macro-expansion could invoke the builder for each
> ; expanded-to insn.
> 
> I don't understand this statement.  Could you elaborate?

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.

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?

; 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.

Greg

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]