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]

how to implement general macro-insn expansion?


Doug,

I found this comment in opc-itab.scm before the definition of
`-gen-macro-insn-table':

; The general form is a Scheme expression that is interpreted at runtime to
; decide how to perform the expansion.  Yes, that means having a (perhaps
; minimal) Scheme interpreter in the assembler.

I hope the idea of having a scheme interpreter in the assembler is
outdated.  My plan was to reuse as much of rtl-c.scm as possible to
generate something analogous to sem-switch.c for the gas-runtime
stuff.

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

Thanks,
Greg

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