Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!udel!wack From: wack@udel.EDU (Andrew Wack) Newsgroups: comp.sys.apple Subject: gcc for the gs Message-ID: <11464@louie.udel.EDU> Date: 23 Mar 89 21:37:03 GMT References: <2692@ncsuvx.ncsu.edu> <9167@claris.com> Sender: usenet@udel.EDU Reply-To: wack@udel.EDU (Andrew Wack) Organization: University of Delaware Lines: 56 In article <9167@claris.com> wombat@claris.com (Scott Lindsey) writes: >From article <2692@ncsuvx.ncsu.edu>, by mikes@ncsuvx.ncsu.edu (Michael Steele): >> >> Will someone PLEASE port gcc to the GS. I would do it but my >> knowledge of 65816 assembly isn't too hot. GCC is a PD compiler >> available for UNIX machines, Amigas, and Atari ST's ( the group >> of PC's that the Gs should be in). > >If someone can get me gcc source I'll be glad to start working on a port >part-time... I can't ftp from this machine. I really don't know how big a >project it'll be. The compiler will have to compile down to object code... >not to assembly: doing it like pcc & just using the system assembler would >be slow as all get-out. But this means that the compiler has to know about >OMF... I've been watching the discussion about gcc here and I thought I would give a few reasons why it would be VERY difficult (notice I did not say impossible) to port it to the GS. I have the manual (150 pages, typeset) that describes how to port it and after reading it about 4 times here is what I have found: 1. gcc uses machine description files for each machine it is to be used on. This file describes the entire target machine's instruction set in terms of rtl (register transfer language). I have heard that it takes about 4 months of hard work to become profficient enought to write this machine description, and after starting to attempt the task, I believe it. (This method of porting does make it much easier in general, however, since the rest of the compiler doesn't change) 2. gcc is designed to generate assembly code to be passed to the assembler. Altering it to generate object code would be a major task. Just for reference the source code is about 6 Meg with only about 30% of that being comments. 3. gcc is really designed for 32 bit machines, with several registers. This isn't hard coded (it is one of the parameters included in the machine description) so this probably wouldn't pose too many difficulties. 4. The final problem that I see (at least for the moment) is that when compiled gcc is HUGE!! Typically it is between 1 and 2 Megabytes of object!! Break out those big memory cards and large hard drives!! To gcc's credit, one of the reasons it is so large is that gcc can perform about every code optimization in the book...thus it tends to generate very good code. These are just my observations from playing with gcc for a few months.. any and all comments about this project are welcome. As I said, I feel this project is very difficult, not impossible. I just wanted to post my observations so that we don't see a fload of people wondering were that new great gcc compiler for the gs went to..... ------------------------------------------------------------------------------- Andrew Wack wack@udel.edu