This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Abstracting pointer arithmetic
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Subject: Re: Abstracting pointer arithmetic
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Mon, 29 Jan 2001 12:46:59 -0500
- Cc: lars at nocrew dot org, gcc at gcc dot gnu dot org
- References: <10101291358.AA22701@vlsi1.ultra.nyu.edu>
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