Some CGEN problems
Kai Henningsen
kai.extern@googlemail.com
Mon Apr 21 08:12:00 GMT 2008
I'm playing with CGEN for a virtual cpu.
Maybe the largest problem (after the rather sparse documentation) is
that the pmacro system seems to be much weaker than GCC's iterator
system.
I've yet to figure out a way to iterate over two variables (such as
"integer opcodes" and "modes for integer opcodes"), or a way to handle
what GCC does with iterator attributes (such as the mapping from RTL
operands to opcode names). Right now, the best way I can think of is
to generate CGEN input with a Perl script ... but surely the whole
point of CGEN is that I shouldn't need that?!
This (and the growing list of stuff that I find that CGEN doesn't even
try to handle) makes me wonder if it might be easier to not use CGEN.
Of course, binutils documentation isn't any better. I thought GCC
documentation was sparse, but compared with these two, it's positively
encyclopedic!
More information about the Cgen
mailing list