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


> My current approach to pointer arithmetic is to define Pmode as
> PSImode and emit RTL insns for pointer arithmetic in addpsi3 etc.
> Unfortunately, the operands passed to the PSImode patterns does not
> carry enough information.  For example, incrementing a pointer is done
> differently if it's a word address or if it's a pointer to a byte
> within a word.
> 
> To work around this, I store the tree type information for each
> register (in struct emit_status).  This works (to some extent) but
> seems like a kludge and a violation of GCC's design.
> 
> 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.


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