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]

multi-insn expansions for macro insns?


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

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