This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Porting new target architecture to GCC
- From: Basile Starynkevitch <basile at starynkevitch dot net>
- To: Ben Morgan <benm dot morgan at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 2 May 2012 13:52:45 +0200
- Subject: Re: Porting new target architecture to GCC
- References: <4FA11ACB.5050801@gmail.com>
On Wed, May 02, 2012 at 01:30:19PM +0200, Ben Morgan wrote:
> In a course at my university (Universität Würzburg, Germany) we have
> created a 32-bit RISC CPU architecture -- the HaDesXI-CPU -- (in VHDL)
> which we then play onto a FPGA (the Xilinx Spartan-3AN) to use. So far
> if we want to do anything with it, we have to write the assembly code
> ourselves.
>
> How much work would it be to write a HadesXI backend for GCC?
> (The idea is to use this as a possible bachelor thesis.)
I am not familiar with back-ends -I'm more familiar with the middle-end-,
and I am not very familiar with the German university system.
I'm guessing that what you call a "bachelor thesis" is what is called
today "License" in the French university system.
My feeling is that understanding GCC and writing a small backend
is a big lot of work for a student. (For a GCC expert, it is rumored that
making a suboptimal backend for a new architecture is several months of work).
So I would perhaps believe that making a new backend for GCC is a quite
ambitious goal (perhaps too ambitious for a bachelor thesis, if your goal
is mostly to make something usable, not only to learn a big lot of things).
If you follow that route, you should first find out, amongst the many existing
GCC back-ends, the architecture which seems similar to what your HaDesXI is.
Notice that GCC has even back-ends for "fictious" architecture like Knuth's MMIX.
To get a picture of GCC, you might be interested to have a glance at some slides
under http://gcc-melt.org/ notably http://gcc-melt.org/GCC-MELT-HiPEAC2012.pdf
which has many links to other material. Of course, you can find a lot
of other material about GCC on Internet.
(you might even want to play with GCC MELT to understand some
of the basic internal representations of GCC)
On the other hand, GCC offers you a very powerful back-end architecture.
But GCC is complex, and significantly evolving!
Regards.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***