[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Porting gcc to the GS
In the recent discussions about the practicality of porting gcc to the
GS, it seemed that the consensus was that Orca/C wasn't up to the job.
Well, if a cross-compiler which was up to the task were available - i.e.
the 2500AD cross-compiler, on the IBM (which is) - that might make it
possible. That being so, I am proceeding on the assumption that it can be
done, and in the light of that, I am requesting comments on, advice
about, and (best of all) practical knowledge of a number of matters:
1) The design and implementation of a Machine Description for the
WDC65816.
2) Writing the RTL file for the Apple IIGS, taking into account the
current usage of memory and availability or otherwise of Floating Point
hardware and software (i.e. SANE, and the various FPU boards available)
3) Implementation of Debug COP-vector code, to provide source-level
debugging with Splat! or Orca/Debug. < Mike? 8-> )
4) Implementation of the assembler prologue and epilogue for functions.
(i.e. stack-access and manipulation to handle parameters, locals and
stuff)
I also have a question: the recent discussions seemed to presume that gcc
was a version of C++, but the documentation for the copy I have (from an
Apple CD, not mine, so I don't know the exact details) makes no reference
to any such matter. As yet, have only extracted the Implementation
documentation (270 pages of VERY small type!), not the source (and I
don't have direct access to the PutterMac that the CD lives on) so I'm
not aware of the actual version number of _this_ copy, but the copyright
date on the docs is 1988-1989.
So, am I working with an older copy of gcc, and if so, where can I obtain
this (putative) C++ version. On the other hand, was all that stuff about
C++ just blither based upon inaccurate information? Please Advise!
A second question: there was mention of one limitation of gcc being that
it made certain assumptions about the size of pointers (at least, I think
that's what was said). Would the person who made this comment please
advise me in more detail about thier concerns? I have looked carefully
through the section on Machine Modes, and it clearly states that pointers
can be handled in different ways, according to their size on the target
machine. Specifically, PSImode provides a 4-byte area for a pointer which
may not need all 32 bits; thus the 24-bit addresses useable on the GS
would be defined as using PSImode, in the RTL.
Finally, I would welcome serious comments on the proposed result. At the
moment, I am planning to produce a compiler which will generate
assembler-source, which will then be passed through Orca/M or Merlin-16.
The reasoning is that this will be easier (i.e. less costly in time) to
do than to implement direct OMF output, and if the assembler is called
automatically (as it can be), then nobody'll know the difference. OTOH,
maybe I'm getting paranoid about the difficulties of producing OMF? Are
there any other details of how the program will work that I should
consider?
Please reply to me by e-mail, to save the bandwidth of those who may find
the deeply-technical nature of these requests and questions less than
enthralling. I shall reply individually to all respondents.
Thanks in advance for any help on this.
----------------------------------------------------------------------
Obey little, question much - Walt Whitman | The only thing my GS hasn't
Specialisation is for ants - Lazarus Long | got is a go-faster stripe.
----------------------------------------------------------------------