(PDP-10) Word addressed pointer arithmetic

Lars Brinkhoff lars.spam@nocrew.org
Thu Apr 12 00:42:00 GMT 2001


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/



More information about the Gcc mailing list