This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Different multiply operator for pointers and integers
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Richard Henderson'" <rth at redhat dot com>
- Cc: "'Richard Earnshaw'" <rearnsha at gcc dot gnu dot org>,"'Laura Tosoratto'" <Laura dot Tosoratto at roma1 dot infn dot it>,<gcc at gcc dot gnu dot org>,"'Alessandro Lonardo'" <alessandro dot lonardo at roma1 dot infn dot it>
- Date: Thu, 16 Dec 2004 18:29:22 -0000
- Subject: RE: Different multiply operator for pointers and integers
> -----Original Message-----
> From: Richard Henderson
> Sent: 16 December 2004 18:14
> On Thu, Dec 16, 2004 at 04:45:18PM -0000, Dave Korn wrote:
> > Doesn't that assume that the registers that hold pointers
> > can _only_ be used for pointers and not for integers?
>
> If that's true, there's absolutely no hope of porting gcc at all.
Sorry, I don't quite get the wording here; I can't tell exactly what is the
referent of "that" in the above sentence. I'm not sure if you mean
1) If it is true that registers that hold pointers can only be used for pointers
and not integers, there's absolutely....
or
2) If it is true that registers that hold pointers can also hold integers,
there's absolutely....
I would tend to assume you mean 2) as ISTM that 1) would be absolutely
necessary for your proposed solution to work, i.e. discriminating the mode of an
operand by the register class it is in.
> We're altogether too free with pointer/integer equivalence.
Hmm, but wouldn't the potential workaround of defining Pmode to some mode
(other than SImode) that is not used by the machine (e.g. PDImode as I
suggested) allow the constraint to work by discriminating not based on register
class but on the mode of the operand? Or by discriminating the mode indirectly
by having two classes of registers, one of which allows all modes (the
pointer-capable registers) and one of which allows all modes except for PDImode?
cheers,
DaveK
--
Can't think of a witty .sigline today....