(PDP-10) Word addressed pointer arithmetic
Joern Rennecke
amylaar@cambridge.redhat.com
Wed Apr 11 14:58:00 GMT 2001
> 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.
More information about the Gcc
mailing list