multi-insn expansions for macro insns?
Greg McGary
greg@mcgary.org
Mon Dec 18 12:02:00 GMT 2000
define-macro-insn currently allows only a simple 1:1 expansion.
I would like to have it handle 1:n expansions.
E.g., for a MIPS-like CPU which has a `bltz' insn (branch if less than
zero), we would need a two insn sequence to support the more general
2-register `blt' (branch if less than):
blt $s1, $s2, label => sub $at, $s1, $s2
bltz $at, label
Is this a desired feature of CGEN? If so, I'll work on it.
I ask because perhaps CGEN architects consider this (and other
"advanced" features of MIPS assemblers) to overstep the proper role of
an assembler.
If it's a go, how about this as a multi-expansion syntax?:
(sequence () (emit ...) (emit ...))
Greg
More information about the Cgen
mailing list