This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] builtins.c, fold-const.c: Don't create type
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: stevenb at suse dot de (Steven Bosscher)
- Cc: schlie at comcast dot net, dan at codesourcery dot com, dnovillo at redhat dot com, kazu at cs dot umass dot edu, roger at eyesopen dot com, gcc-patches at gcc dot gnu dot org, sabre at nondot dot org
- Date: Sat, 16 Apr 2005 18:38:08 -0400 (EDT)
- Subject: Re: [patch] builtins.c, fold-const.c: Don't create type
> On IRC, Chris Lattner mentioned (if I understood him correctly) that in
> LLVM this kind of pointer arithmetic doesn't exist, and that instead it
> is converted to "regular" integer arithmatic by casting the pointer to
> intptr_t (instead of casting the integer to a pointer). Would that be
> a better solution for GCC too, perhaps?
I don't know anything about LLVM. However, PA-RISC supports the
following indexed modes:
REG_PTR + SMALL_INT
REG_PTR + REG
The REG_PTR register selects the space register to use for the access
(i.e., one of four memory quadrants). As a result, base and index
registers can't be interchanged. I don't see how converting to
regular integer arithmetic helps.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)