This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]