This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Modifing Gcc
On Sun, 20 Dec 2004, Ben Elliston wrote:
> Sridat Kota <sridat@gmail.com> writes:
> > I am a research student at the University of Auckland in New Zealand
> > an I am currently attempting to modify GCC so I can port it onto a
> > newly designed architecture. The new processor called MiCore is am
> > general purpose embedded systems processor with a risk
> > architecture. I am looking for some directions on which files to
> > change in the source code for this.
>
> For a new port, the best approach is to find the closest CPU
> architecture that GCC has been ported to and clone that port. That
> means copying the gcc/config/FOO subdirectory and modifying that.
I'd rather recommend starting from scratch and walking through
the info pages building your .md, .c and .h. Really. It may
take a couple of iterations. Otherwise you're likely to end up
with a bunch of likely-obsolete quirks you have no clue what
they were for originally.
> As for the details of the .md files and the like, I recommend you read
> the GCC internals manual -- in particular, the chapter on machine
> descriptions.
And look at other ports for clues when the manual says nothing.
(I don't know why I have to say this, it should be obvious.)
brgds, H-P