Commit 6b438d58 by Anton Blanchard Committed by Alan Modra

rs6000.c (rs6000_adjust_atomic_subword): Calculate correct shift value in little-endian mode.

	* config/rs6000/rs6000.c (rs6000_adjust_atomic_subword): Calculate
	correct shift value in little-endian mode.

From-SVN: r199935
parent 3bc66938
2013-06-11 Anton Blanchard <anton@samba.org>
* config/rs6000/rs6000.c (rs6000_adjust_atomic_subword): Calculate
correct shift value in little-endian mode.
2013-06-11 Jakub Jelinek <jakub@redhat.com> 2013-06-11 Jakub Jelinek <jakub@redhat.com>
PR target/56564 PR target/56564
......
...@@ -17881,6 +17881,7 @@ rs6000_adjust_atomic_subword (rtx orig_mem, rtx *pshift, rtx *pmask) ...@@ -17881,6 +17881,7 @@ rs6000_adjust_atomic_subword (rtx orig_mem, rtx *pshift, rtx *pmask)
shift = gen_reg_rtx (SImode); shift = gen_reg_rtx (SImode);
addr = gen_lowpart (SImode, addr); addr = gen_lowpart (SImode, addr);
emit_insn (gen_rlwinm (shift, addr, GEN_INT (3), GEN_INT (shift_mask))); emit_insn (gen_rlwinm (shift, addr, GEN_INT (3), GEN_INT (shift_mask)));
if (WORDS_BIG_ENDIAN)
shift = expand_simple_binop (SImode, XOR, shift, GEN_INT (shift_mask), shift = expand_simple_binop (SImode, XOR, shift, GEN_INT (shift_mask),
shift, 1, OPTAB_LIB_WIDEN); shift, 1, OPTAB_LIB_WIDEN);
*pshift = shift; *pshift = shift;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment