This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: (PDP-10) Word addressed pointer arithmetic


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]