This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Retargetting GCC for fictitious processors


On Thursday, March 6, 2003, at 01:17 AM, Marty Hauff wrote:
In order to do this I need to be able to tweak the machine descriptions etc. and reasonably easily (one day automatically) rebuild the compiler for the new machine. I have considered other compilers however GCC seems to offer the best mix of maturity vs accessibility.
As I have quickly found out, however, retargeting GCC is not just a single afternoon affair - It wants your life!
My questions to the group are:
* Does anyone have any minimalistic machine descriptions that might be useless in a practical sense but at least make it through a full compilation.

The way to do this, is to pick a nice, normal processor that is closest to the target processor you are interested in and just modify it as appropriate.


For example, you want to test 8 gen regs, or 64 general regs, take rs6000.{md,c,h} and edit in the changes, about 20 lines if you're lucky, and in five minutes, you're done.

Compare this with, 2 months to do a port, and then 5 minutes to tweak it.

If it doesn't build and generate code that is close, your very last change is wrong, and if you just stare at those 10 lines, maybe it will hit you, which is better than doing a port, and then wondering why it doesn't work.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]