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: Bug in reload.c


On Thu, 14 Feb 2002, Bernd Schmidt wrote:

> On Thu, 14 Feb 2002, Ulrich Weigand wrote:
>
> > Not with the current s390 backend because this always accepts a literal
> > pool address as legitimate; however we are experimenting with changing
> > this to declaring them illegitimate and replacing them by base register
> > + offset in LEGITIMIZE_RELOAD_ADDRESS  (the goal of this is to avoid the
> > need for a fixed base register and instead having reload allocate one
> > when needed...).
>
> That may not be a valid use of that macro.  It should be thought of as
> useful for optimization, but I don't think one should try to use it to
> achieve correctness.

It's needed (not just an optimization) for CRIS, because gcc
breaks an address with sign_extend at the wrong place.  To quote
from cris.h:
   Work around imperfection in reload_load_address1:
    (plus (sign_extend (mem:qi (reg))) (reg))
   should be reloaded as (plus (reg) (reg)), not
    (plus (sign_extend (reg)) (reg)).

Maybe that's not needed now, I haven't checked for a while.

brgds, H-P


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