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]

(PDP-10) Word addressed pointer arithmetic


Hello,

I've been working on the PDP-10 port.  It works quite well, except for
some problems with pointers and pointer arithmetic.  This is what I
expected, since the PDP-10 is a word-addressed machine with a peculiar
format for pointers to objects smaller than a word.

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?

Any advice would be very welcome.


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