This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
multi-insn expansions for macro insns?
- To: cgen at sourceware dot cygnus dot com
- Subject: multi-insn expansions for macro insns?
- From: Greg McGary <greg at mcgary dot org>
- Date: Mon, 18 Dec 2000 13:02:23 -0700
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