Copy ALIAS_SET_MEMORY_BARRIER when creating a new MEM for atomic ops.

* config/alpha/alpha.c (alpha_split_compare_and_swap_12): Copy
	ALIAS_SET_MEMORY_BARRIER when creating a new memory.
	(alpha_split_atomic_exchange_12): Likewise.
	* config/rs6000/rs6000.c (rs6000_adjust_atomic_subword): Likewise.

From-SVN: r181436
This commit is contained in:
Richard Henderson 2011-11-16 20:44:27 -08:00 committed by Richard Henderson
parent 00449933e6
commit 4eace304b8
3 changed files with 18 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2011-11-16 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.c (alpha_split_compare_and_swap_12): Copy
ALIAS_SET_MEMORY_BARRIER when creating a new memory.
(alpha_split_atomic_exchange_12): Likewise.
* config/rs6000/rs6000.c (rs6000_adjust_atomic_subword): Likewise.
2011-11-16 Joseph Myers <joseph@codesourcery.com>
* config/i386/i386elf.h (PREFERRED_DEBUGGING_TYPE): Remove.

View File

@ -4444,6 +4444,8 @@ alpha_split_compare_and_swap_12 (rtx operands[])
mem = gen_rtx_MEM (DImode, align);
MEM_VOLATILE_P (mem) = MEM_VOLATILE_P (orig_mem);
if (MEM_ALIAS_SET (orig_mem) == ALIAS_SET_MEMORY_BARRIER)
set_mem_alias_set (mem, ALIAS_SET_MEMORY_BARRIER);
alpha_pre_atomic_barrier (mod_s);
@ -4583,6 +4585,8 @@ alpha_split_atomic_exchange_12 (rtx operands[])
mem = gen_rtx_MEM (DImode, align);
MEM_VOLATILE_P (mem) = MEM_VOLATILE_P (orig_mem);
if (MEM_ALIAS_SET (orig_mem) == ALIAS_SET_MEMORY_BARRIER)
set_mem_alias_set (mem, ALIAS_SET_MEMORY_BARRIER);
alpha_pre_atomic_barrier (model);

View File

@ -17244,16 +17244,16 @@ rs6000_post_atomic_barrier (enum memmodel model)
which to shift and mask. */
static rtx
rs6000_adjust_atomic_subword (rtx mem, rtx *pshift, rtx *pmask)
rs6000_adjust_atomic_subword (rtx orig_mem, rtx *pshift, rtx *pmask)
{
rtx addr, align, shift, mask;
rtx addr, align, shift, mask, mem;
HOST_WIDE_INT shift_mask;
enum machine_mode mode = GET_MODE (mem);
enum machine_mode mode = GET_MODE (orig_mem);
/* For smaller modes, we have to implement this via SImode. */
shift_mask = (mode == QImode ? 0x18 : 0x10);
addr = XEXP (mem, 0);
addr = XEXP (orig_mem, 0);
addr = force_reg (GET_MODE (addr), addr);
/* Aligned memory containing subword. Generate a new memory. We
@ -17262,7 +17262,9 @@ rs6000_adjust_atomic_subword (rtx mem, rtx *pshift, rtx *pmask)
align = expand_simple_binop (Pmode, AND, addr, GEN_INT (-4),
NULL_RTX, 1, OPTAB_LIB_WIDEN);
mem = gen_rtx_MEM (SImode, align);
MEM_VOLATILE_P (mem) = 1;
MEM_VOLATILE_P (mem) = MEM_VOLATILE_P (orig_mem);
if (MEM_ALIAS_SET (orig_mem) == ALIAS_SET_MEMORY_BARRIER)
set_mem_alias_set (mem, ALIAS_SET_MEMORY_BARRIER);
/* Shift amount for subword relative to aligned word. */
shift = gen_reg_rtx (SImode);