disable indexing
Jorge PEREZ
jorge.perez@invia.fr
Wed Jun 17 06:43:00 GMT 2009
Thanks very much for your replies.
Actually I'm interested on doing something similar to the
-mdisable-indexing of the PA proc. but to the SPARC. I'm being bothered
by the indirect jumps since I'm modifying the compiled and linked
(sparc-elf-gcc) version of a program. I actually change the number of
lines and therefore I need to establish the new links. When those are
defined in some of the fields of an instruction I can easily alter them
to point to the new address, however when the target address is defined
in a register I'm completely lost and I don't have a clue of how to deal
with it (or avoid it). Any ideas are welcome. Thanks again!
Jorge
>
> Le mardi 16 juin 2009 à 10:28 -0600, Jeff Law a écrit :
> > Ian Lance Taylor wrote:
> > > Jorge PEREZ <jorge.perez@invia.fr> writes:
> > >
> > >
> > >> I found that the option -mdisable-indexing prevents the compiler from
> > >> using indexing address modes but such option only exists for some
> > >> specific architectures. the question is how can i get the same effect of
> > >> that option for SPARC (since such option does not exist for sparc-gcc)?
> > >>
> > >
> > > You can't. Sorry. -mdisable-indexing is only supported for the PA
> > > processor, where an indexed memory address is one which uses two
> > > registers, one of which is multiplied by a constant and added to the
> > > other one to form the address. Does the SPARC even support that type of
> > > memory address? Why do you want to disable it?
> > >
> > >
> > Note that -mdisable-indexing also disables reg+reg addressing, which is
> > by far the more problematical on the PA.
> >
> > The problem with reg+reg addressing on the PA is it's virtually
> > impossible to determine which register is the base and which is the
> > index. It's vital to make that distinction because the PA selects the
> > memory space (aka segment) register from the base register, not the full
> > effective address.
> >
> > GCC works around this problem by trying to track which register is the
> > pointer via REG_POINTER. Which works fine except for Ada which can set
> > REG_POINTER on a virtual origin.
> >
> > Jeff
>
>
More information about the Gcc-help
mailing list