This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patches for HP-UX support on IA64
- To: rth at redhat dot com
- Subject: Re: Patches for HP-UX support on IA64
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Thu, 11 Jan 01 13:22:15 EST
- Cc: gcc-patches at gcc dot gnu dot org, sje at cup dot hp dot com
In any case, your changes to the generic code are not acceptable.
In particular this
> ! #ifdef HAVE_extend_ptr
> ! return CODE_FOR_extend_ptr;
> ! #else
> ! return extendtab[(int) to_mode][(int) from_mode][unsignedp != 0];
> ! #endif
is so amazingly broken that I can't believe you got anything at
all to compile.
That's not a constructive comment and I don't undertsand why you feel that
way. For the record, don't "blame" Steve for that code: it was my idea
and I still feel it's the best way. What, precisely, is wrong with that
code? It seemed to work fine for me when I experimented with it.
I think the correct solution to this problem is to change Pmode for
your target. Note that "void*" is ptr_mode not Pmode, and the two
need not be the same. PDImode seems appropriate.
No, not at all. Pmode is the *hardware* addressing mode. At the hardware
level, all 64 bits are meaningful. So it has to be DImode.
ptr_mode is the mode for the user pointer datatype. That's a 32-bit value
with all 32 bits used. So it should be ptr_mode.
The only peculiar thing about this port is the way that 32-bit user-level
addresses are translated to 64-bit hardware addresses. So *that's* the
only piece that should be different, in my opinion.
Adding a new MD patten that overrides the default way of converting from
one form of address to the other seems the approach that most matches the
situation. What don't you like about it? It's only a tiny change
to the machine-independent code.