Thursday, June 27, 2002 Mikael Djurfeldt wrote:

> That is, I'd like to link my interpreter with the gcc backend.

This is a very FAQ, for which there is no good answer. Here are
some resources which I have collected.

There is also 'Using and Porting GNU CC' which comes with GCC and
you can salso buy a hardcopy from the FSF.

Integration with the GCC back end is mainly via the tree.[ch] and
tree.def interface and the assorted subroutines that come with
that. You don't actually generate the RTL yourself - the routines
do that for you from the tree nodes.

You will see many complaints in the documentation that the front
end and back end are not cleanly separated. Also the back end is
more friendly to C front ends at least though this is not a show

The back end interface is also pretty low level and could
usefully be encapsulated into some more friendly interface. In
that sense a library is a good idea. I am trying to integrate a
cobol front end into gcc at present and I will probably do some
encapsulation, but this does not have a fixed end date! So as far
as I know, you will have to do a fair bit of work.

Having said that, GCC back end provides tremendous value - 30
platforms supported out automatically; lots of optimisation;
automatic creation of numerous varieties of debugging
information, ability to use gdb for debugging.

I'm not sure also if you are aware


Post a Comment

<< Home