This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PDP-10 backend for gcc
- To: lars brinkhoff <lars at nocrew dot org>
- Subject: Re: PDP-10 backend for gcc
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 31 Aug 2000 09:53:57 -0600
- cc: Alan Lehotsky <lehotsky at tiac dot net>, gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <857l8ylv6b.fsf@junk.nocrew.org>you write:
> Alan Lehotsky <lehotsky@tiac.net> writes:
> > Won't work - you can't tag integers and the back-end won't
> > be able to figure out when an integer is part of a pointer
> > and when it's just adding 1 to a variable.
> >
> > The RTL phase discards almost ALL language type information and
> > only operates on things in 'enum machine_mode', which is
> > basically just an enumeration of basic data types of fundemental
> > sizes (viz. QImode, HImode, SImode...)
>
> Oh. But the back end MUST know whether it's operating on pointers or
> integers. Byte pointer subtraction on a PDP-10 is much different from
> integer subtraction. Basically, PDP-10 byte pointers are not are not
> integers, at least not with respect to how arithmetic are performed on
> them.
You've got a significant problem then. You're most likely going to have
to use something like PSImode or PDImode or something new to represent
your pointers.
Fundamentally GCC assumes that arithmetic on pointer types works just
like arithmetic on integer types.
jeff