This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Pointers Extend Unsigned Question
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: Pointers Extend Unsigned Question
- From: Jim Wilson <wilson at cygnus dot com>
- Date: Thu, 29 Apr 1999 16:17:58 -0700
- cc: Donn Terry <donn at interix dot com>, "egcs at egcs dot cygnus dot com" <egcs at egcs dot cygnus dot com>, egcs-bugs at egcs dot cygnus dot com, Richard Kenner <kenner at gnat dot com>
The only other target I can think of where this should be a problem
is a mips3 target running in 64-bit mode with 32-bit pointers. I
don't know if anyone actually uses such a configuration in practice.
I suspect that normally the chip is simply put into 32-bit mode.
The default irix6 ABI (n32) uses 32-bit pointers in 64-bit mode.
The mips backend however always sign extends 4-byte values, regardless of
type, so we shouldn't see this problem for a mips target. This happens
primarily via TRULY_NOOP_TRUNCATION and the truncate patterns in the md file.
The alpha port doesn't use TRULY_NOOP_TRUNCATION. It uses different
mechanisms to get a similar effect. The alpha way is probably better in some
ways. My recollection though is that the 32-bit alpha port wasn't stable until
after most of the intial irix6 porting work was done, so I ended up using
different methods than what Kenner invented for the 32-bit alpha port.
Jim