This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH, rs6000: backport PR 37640
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: edelsohn at gnu dot org, Geoff Keating <geoffk at geoffk dot org>, andrew_pinski <andrew_pinski at playstation dot sony dot com>
- Date: Tue, 18 Nov 2008 16:42:51 +1100
- Subject: PATCH, rs6000: backport PR 37640
I would like to backport this patch from mainline to the 4.3 branch --
OK? Tested with a bootstrap and regression test run on powerpc64-linux.
Thanks, Ben
2008-11-18 Ben Elliston <bje@au.ibm.com>
Backport from mainline:
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.
Index: config/rs6000/rs6000.c
===================================================================
--- config/rs6000/rs6000.c (revision 141955)
+++ config/rs6000/rs6000.c (working copy)
@@ -13835,7 +13835,8 @@
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)));
testsuite/
2008-11-18 Ben Elliston <bje@rego11.ozlabs.ibm.com>
Backport from mainline:
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.
(I won't paste the full test case here; it's just a copy of the one in
mainline).