This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Abstracting pointer arithmetic
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Subject: Re: Abstracting pointer arithmetic
- From: Lars Brinkhoff <lars at nocrew dot org>
- Date: 29 Jan 2001 14:21:03 +0100
- Cc: gcc at gcc dot gnu dot org
- Organization: nocrew
- References: <10101291312.AA22492@vlsi1.ultra.nyu.edu>
kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
> I'm writing a back end for a word-adressed machine. For this machine,
> pointer arithmetic doesn't quite work like integer arithmetic.
> Pointers to sub-word objects have a word address in the low bits, and
> a byte selector in the top bits, and are incremented using a special
> instruction. Subtracting or comparing these pointers takes several
> instructions. Pointers to words are incremented by adding 1*<number
> of words>, not 4*<number of words>, but otherwise behave as integers.
> For *those* machines you can define Pmode as a different class. I thought
> you were proposing doing it for *all* machines in order to support those.
No, I didn't mean to do that.
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?
Or would something at the tree level still make more sense?