From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg McGary To: Doug Evans Cc: cgen@sourceware.cygnus.com Subject: Re: how to implement general macro-insn expansion? Date: Wed, 20 Dec 2000 00:48:00 -0000 Message-id: References: <200012182002.NAA03245@kayak.mcgary.org> <14910.31997.701815.400981@casey.transmeta.com> X-SW-Source: 2000-q4/msg00282.html Greg McGary 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