This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: (PDP-10) Word addressed pointer arithmetic
- To: Joern Rennecke <amylaar at cambridge dot redhat dot com>
- Subject: Re: (PDP-10) Word addressed pointer arithmetic
- From: Lars Brinkhoff <lars dot spam at nocrew dot org>
- Date: 12 Apr 2001 09:41:45 +0200
- Cc: gcc at gcc dot gnu dot org
- Organization: nocrew
- References: <200104112157.f3BLvr709067@phal.cambridge.redhat.com>
Joern Rennecke <amylaar@cambridge.redhat.com> writes:
> > If the tree type information is needed for code generation, perhaps
> > tree-based approach is the right thing?
> I think to handle this properly, we'd have to have different modes for
> the two different kinds of pointer (word pointer vs. byte pointer.
That's still not enough information. If GCC tells the backend "add 2
to this byte pointer", the backend must know whether it's a pointer
to char or a pointer to short.
(For example, in PDP-10 assembly language, adding 2 to a char pointer
would be something like
MOVEI 0,2
ADJSP 0,pointer ; result in register 0
and adding 2 to a short pointer would just be
IBP pointer
.)
--
http://lars.nocrew.org/