On Sat, Jan 17, 2015 at 09:30:07AM -0500, David Edelsohn wrote:
> On Sat, Jan 17, 2015 at 3:48 AM, Segher Boessenkool
> <seg...@kernel.crashing.org> wrote:
> > This fixes 29 FAILs.
> >
> > The ld, lwa etc. insns do not encode the low two bits of the offset in
> > the opcode; those have to be zero.  For -m64 this seemed to never matter,
> > datums are always aligned; but for -m32 -mpowerpc64 you can get symbols
> > that are not sufficiently aligned.  So check for that.
> >
> > [ Hrm, I think this triggers for lwz as well?  I'll investigate. ]
> >
> >
> > 2015-01-16  Segher Boessenkool  <seg...@kernel.crashing.org>
> >
> > gcc/
> >         * config/rs6000/rs6000.c (lo_sum_symbol_misaligned_p): New function.
> >         (legitimate_lo_sum_address_p): Use it for TARGET_POWERPC64.
> 
> Okay.

I'll hold off on this one until it's clear what it does for lwz, and -m64
performance too.

It should do absolutely nothing for aligned accesses, so it cannot be all
that bad, but I don't want to regress even a tiny little bit so late in
the game.  -m32 -mpowerpc64 hasn't worked properly for years, this series
does not fix everything yet (it doesn't do anything specific to Darwin,
too), and this patch fixes a relatively minor issue (not affecting too
many programs).


Segher

Reply via email to