[PATCH] Fix execute/980205 on 32bit SPARC

David S. Miller davem@redhat.com
Tue Mar 21 09:39:00 GMT 2000


   Date: Tue, 21 Mar 2000 18:04:59 +0100
   From: Jakub Jelinek <jakub@redhat.com>

   If -O0, reload may happily store %fp + non-8-aligned const into
   some stack slot, load it then again and mem_min_alignment will
   assume it is 8 byte aligned which results in SIGBUS.

Ok, if this fixes that failure case, please apply this patch.

I've known for quite a while about this bug but never stumbled
upon a quick fix which cured it and didn't introduce new bugs. ;-)

I really wanted to fix this differently, but it's a lot more
work.  The idea was to make the expanders force us into a particular
insn pattern based upon whether REGNO_POINTER_ALIGN was sufficient
or not for the ldd/std insns.

This way, we make the decision _before_ reload can run which is
when REGNO_POINTER_ALIGN information is still valid.

It really is a bug to do things the way we do now, it happens
to work, but it may not some time in the future.  And this is
why we really should fix this properly as soon as we have the
chance.

Later,
David S. Miller
davem@redhat.com


More information about the Gcc-patches mailing list