This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PDP-10 backend for gcc
On Wed, Sep 06, 2000 at 11:18:00AM +0200, lars brinkhoff wrote:
> Andrew Morton <andrewm@uow.edu.au> writes:
> > Michael Meissner wrote:
> > > Given this byte pointer-ness has been in the compiler
> > > since its inception, I suspect you will find
> > > undocumented assumptions rife throughout the compiler.
> >
> > You suspect correctly. I once ported gcc/g++ 2.5.8 to a
> > bit-addressable machine. A machine where you have to add
> > 8 to an address register to advance it by a byte.
> >
> > I found thirty or forty instances of this byte == 1
> > assumption, and basically the only way of tracking
> > them down was working backwards from incorrect
> > code generation.
>
> Isn't it about time gcc was enhanced to support "weird" pointers?
Sure I do. FYI, since I wrote a (non GCC) C compiler front end for a machine
with weird pointers (Data General MV/Eclipse, RIP) and supported it for 5
years, I can certainly agree that it is needed. However, I tend to have much
more on my plate than I can code....
I'm just warning you that it is a big job. Even after you are done, be
prepapred to find that a lot of net code will fail due to many C programmers
being unable to figure out that logically each different type of pointer can
potentially have a different size or layout, other than the char * == void *,
and all struct/union pointers must have the same size and layout requirements
that are in the C standards.
--
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482