This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: An assortment of questions
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc at gcc dot gnu dot org
- Cc: "Loren Wilton" <lwilton at earthlink dot net>
- Date: Sun, 28 May 2006 13:40:59 +0100
- Subject: Re: An assortment of questions
- References: <07c601c68227$1e9d0460$7d25a8c0@watson1>
> The machine is very strange in modern terms. ?It doesn't have registers, it
> executes code in reverse Polish, the integer data type is a degenerate form
> of the floating point data type, pointers are magic, there are no page
> tables, and the word size isn't a power of 2, just to start. ?Oh, and the
> integers (floating point mantissas with exponent of zero) are
> sign/magnitude. ?And boolean quantities are even/odd, rather than
> zero/nonzero.
>...
> Does it seem feasible to be able to add a new math data type and still
> expect things to work? Or is this a 'flat impossibility'? Any pointers on
> what I should start looking at in the compiler?
It's unclear whether you're trying to generate code to run on this machine, or
have gcc accept binaries for this machine as a "sourse" language, or both.
If you're trying to generate code for this machine, then I have to ask why.
You mention that you're running on an emulator anyway, so why not just run
new code directly for the machine running the emulator, which is persumably a
vaguely sane architecture.
If you're trying to use gcc as a binary translator (ie. feeding the original
binaries in and getting something a native application out) then I would
seriously consider writing a translator that generates C or C++, then feeding
that through a normal compiler.
Either way, it doesn't sound like hacking gcc is worth the effort. I find it
hard to believe that people are actually writing new code for such a bizarre
machine.
Paul