From 1a93ca861c1a08072d089f62ce979bd80da574b0 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Tue, 12 May 2015 15:49:21 +0200 Subject: [PATCH] rs6000.md (rs6000_adjust_atomic_subword): Use gen_ashlsi3 and gen_andsi3 instead of gen_rlwinm. * config/rs6000/rs6000.md (rs6000_adjust_atomic_subword): Use gen_ashlsi3 and gen_andsi3 instead of gen_rlwinm. From-SVN: r223071 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/rs6000.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e605c56a5e5..7a07d50ff96 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-05-12 Segher Boessenkool + + * config/rs6000/rs6000.md (rs6000_adjust_atomic_subword): Use + gen_ashlsi3 and gen_andsi3 instead of gen_rlwinm. + 2015-05-12 Segher Boessenkool * config/rs6000/rs6000.md (extzv): FAIL for SImode. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 7971cbadd0a..3e6f2e35aa3 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -20580,7 +20580,9 @@ rs6000_adjust_atomic_subword (rtx orig_mem, rtx *pshift, rtx *pmask) /* Shift amount for subword relative to aligned word. */ shift = gen_reg_rtx (SImode); addr = gen_lowpart (SImode, addr); - emit_insn (gen_rlwinm (shift, addr, GEN_INT (3), GEN_INT (shift_mask))); + rtx tmp = gen_reg_rtx (SImode); + emit_insn (gen_ashlsi3 (tmp, addr, GEN_INT (3))); + emit_insn (gen_andsi3 (shift, tmp, GEN_INT (shift_mask))); if (BYTES_BIG_ENDIAN) shift = expand_simple_binop (SImode, XOR, shift, GEN_INT (shift_mask), shift, 1, OPTAB_LIB_WIDEN); -- 2.30.2