This is the mail archive of the 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]
Other format: [Raw text]

Re: how well does gcc support type-specific pointer formats?

Richard Biener writes:
 > On Wed, Sep 30, 2015 at 11:23 AM, Mikael Pettersson
 > <> wrote:
 > > Does gcc allow backends to have a say in how pointers are represented
 > > (bits beyond the address), what happens in conversions between pointer
 > > types, and what happens in conversions between pointers and uintptr_t?
 > >
 > > The target in question has:
 > > - one pointer format and set of load/store instructions for pointers to int/long
 > > - another format and set of load/store instructions for pointers to char
 > > - pointers to short use a third format in general, but can use the int/long
 > >   format IF you know which half of the word you're going to access
 > >
 > > What mechanisms, if any, are present in gcc to deal with this?
 > Basically none.  The only thing I could imagine you could use is have
 > the pointer
 > formats be different address-spaces.  The target controls how to
 > convert pointers
 > from/to different address-spaces.  I am not aware of specialities for
 > pointer-to-int
 > or int-to-pointer conversion though - IIRC they simply use
 > bit-identical conversions
 > (thus subregs if the modes differ).
 > But who would design this kind of weird architecture and think he could get
 > away with that easily?
 > Richard.

It's an old mainframe architecture, not a new design.

A company produced clones up until a few years ago.  They also
maintained a private gcc port based initially on gcc-3.2 and
eventually on gcc-4.3, but were unable to rebase on gcc-4.4.
I have access to that port, and am trying to figure out if it
can be reimplemented in some sane say.


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