[PATCH rs6000] Fix PR 37640, __sync_lock_test_and_set on PPC64 causes ICE

Andrew Pinski pinskia@gmail.com
Sun Sep 28 22:32:00 GMT 2008


Opps forgot the patch itself :(.


On Sun, Sep 28, 2008 at 2:44 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> Hi,
>  The issue here is that the rs6000 back-end tries to take the lower
> part (via gen_lowpart_common) of a plus rtl.  This causes an ICE as it
> is not handled.  The way to correct this is to force the address (the
> plus RTL) to a register and then take the lower part of that register.
>
> OK? Bootstrapped and tested on ppc64-linux-gnu with no regressions.
>
> Thanks,
> Andrew Pinski
>
> ChangeLog:
> * config/rs6000/rs6000.c (rs6000_expand_compare_and_swapqhi): Force
> address to a register before taking the lower part.
>
> testsuite/ChangeLog:
> * gcc.c-torture/compile/sync-3.c: New testcase to check that addresses
> of non zero offset works.
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fixsync.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080928/04fa67b6/attachment.txt>


More information about the Gcc-patches mailing list