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 rs6000] Fix PR 37640, __sync_lock_test_and_set on PPC64 causes ICE


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.
>

Attachment: fixsync.diff.txt
Description: Text document


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