This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH rs6000] Fix PR 37640, __sync_lock_test_and_set on PPC64 causes ICE
- From: "Andrew Pinski" <pinskia at gmail dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>, "David Edelsohn" <dje dot gcc at gmail dot com>
- Date: Sun, 28 Sep 2008 14:44:36 -0700
- Subject: [PATCH rs6000] Fix PR 37640, __sync_lock_test_and_set on PPC64 causes ICE
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.