aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/rs6000
diff options
context:
space:
mode:
authorAndrew Pinski <andrew_pinski@playstation.sony.com>2008-09-28 23:07:01 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2008-09-28 16:07:01 -0700
commit4b49d9cebcb3e228467db4f45adfe00986f26f30 (patch)
tree9f196ee3834f09ea3f8097275cea07421e2990e8 /gcc/config/rs6000
parent30deaaf309195b515d474935c283620973a1fb3e (diff)
downloadgcc-4b49d9cebcb3e228467db4f45adfe00986f26f30.zip
gcc-4b49d9cebcb3e228467db4f45adfe00986f26f30.tar.gz
gcc-4b49d9cebcb3e228467db4f45adfe00986f26f30.tar.bz2
re PR target/37640 (__sync_lock_test_and_set on PPC64 causes ICE)
2008-09-28 Andrew Pinski <andrew_pinski@playstation.sony.com> PR target/37640 * config/rs6000/rs6000.c (rs6000_expand_compare_and_swapqhi): Force address to a register before taking the lower part. 2008-09-28 Andrew Pinski <andrew_pinski@playstation.sony.com> PR target/37640 * gcc.c-torture/compile/sync-3.c: New testcase to check that addresses of non zero offset works. From-SVN: r140740
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r--gcc/config/rs6000/rs6000.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 924fa9e..0940c22 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -14020,7 +14020,8 @@ rs6000_expand_compare_and_swapqhi (rtx dst, rtx mem, rtx oldval, rtx newval)
HOST_WIDE_INT imask = GET_MODE_MASK (mode);
/* Shift amount for subword relative to aligned word. */
- addrSI = force_reg (SImode, gen_lowpart_common (SImode, XEXP (mem, 0)));
+ addrSI = force_reg (GET_MODE (XEXP (mem, 0)), XEXP (mem, 0));
+ addrSI = force_reg (SImode, gen_lowpart_common (SImode, addrSI));
shift = gen_reg_rtx (SImode);
emit_insn (gen_rlwinm (shift, addrSI, GEN_INT (3),
GEN_INT (shift_mask)));