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: Abstracting pointer arithmetic


On Mon, Jan 29, 2001 at 08:58:44AM -0500, Richard Kenner wrote:
>     So with the clarification that my suggestion was only to apply for
>     machines with exotic pointer aritmetic (say, #define EXOTIC_POINTERS
>     in the target description), was my suggestion reasonable?
> 
> You don't need that #define since the Pmode define should be good enough.

No.  Consider a 'typical' word pointer machine.  If the pointer is a pointer to
an integer aligned type (and aligning all struct/unions to meet the requirement
that all struct/union pointers have the same size/format), you might want Pmode
to translate into PSImode, but if the pointer is a pointer to a short or byte,
it gets translated into PDImode.  You really need a macro that takes the
pointer tree type and gives the appropriate type.

>     Or would something at the tree level still make more sense?
> 
> I don't think it would be enough due to reload issues and there's
> *probably* no point in doing it at both levels.

-- 
Michael Meissner, Red Hat, Inc.  (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482

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