> 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. > > You have already ported binutils and gdb if I understand correctly?
And don't forget an ISS (gdb sim, sid, ...) or a testsuite/board interface if you want to run the GCC execution testsuite... >> How much work would it be to write a HadesXI backend for GCC? (The idea is >> to use this as a possible bachelor thesis.) > > It's not the idea of your Betreuer, I hope. If so, it's unfair to propose > this as a bachelor thesis. Besides that the pure implementation will > take several months for an experienced GCC developer (others already commented > on this), you will have to author and write corresponding paperwork. > > Porting GCC is "only filling in hooks", yes, but the internals linked below > are often misleading and hard to read for newcomers, likewise intuition from > programming experience is often misleading and wrong. > > Without an experienced GCC developer / backend guy as tutor I'd strongly > discourage to pick this topic, and even with an experienced tutor it's > a *very* ambitious project, and bugs and shortcoming of the implementation and > the resulting gcc executables are likely to diminish you grading in an unfair > way. > I do agree with Johann. As an example, we proposed, years ago, a 6-month engineering school internship to do develop a gcc backend "as much as possible", only focused on GCC (sid/gdb/as/ld/... was already done). The student had no GCC backend skills before beginning. I think he coped with it very well, but the result was not stable at all, the testsuite was not set up, and the work had to be continued for weeks/months. And I don't talk about optimizations... So be careful not underestimating the amount of work. Aurelien