Commit 7ab923cc by Jakub Jelinek Committed by Jakub Jelinek

calls.c (compute_argument_addresses): Force stack slots into alias set 0.

	* calls.c (compute_argument_addresses): Force stack slots into
	alias set 0.
	* expr.c (emit_push_insn): Force pushes into alias set 0.

From-SVN: r34662
parent 054451ea
2000-06-23 Jakub Jelinek <jakub@redhat.com>
* calls.c (compute_argument_addresses): Force stack slots into
alias set 0.
* expr.c (emit_push_insn): Force pushes into alias set 0.
2000-06-23 Richard Henderson <rth@cygnus.com> 2000-06-23 Richard Henderson <rth@cygnus.com>
* config/ia64/ia64.md (pred_rel_mutex): Only take one register. * config/ia64/ia64.md (pred_rel_mutex): Only take one register.
......
...@@ -1595,6 +1595,13 @@ compute_argument_addresses (args, argblock, num_actuals) ...@@ -1595,6 +1595,13 @@ compute_argument_addresses (args, argblock, num_actuals)
args[i].stack_slot = gen_rtx_MEM (args[i].mode, addr); args[i].stack_slot = gen_rtx_MEM (args[i].mode, addr);
set_mem_attributes (args[i].stack_slot, set_mem_attributes (args[i].stack_slot,
TREE_TYPE (args[i].tree_value), 1); TREE_TYPE (args[i].tree_value), 1);
/* Function incoming arguments may overlap with sibling call
outgoing arguments and we cannot allow reordering of reads
from function arguments with stores to outgoing arguments
of sibling calls. */
MEM_ALIAS_SET (args[i].stack) = 0;
MEM_ALIAS_SET (args[i].stack_slot) = 0;
} }
} }
} }
......
...@@ -3052,6 +3052,8 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, ...@@ -3052,6 +3052,8 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
else else
#endif /* PUSH_ROUNDING */ #endif /* PUSH_ROUNDING */
{ {
rtx target;
/* Otherwise make space on the stack and copy the data /* Otherwise make space on the stack and copy the data
to the address of that space. */ to the address of that space. */
...@@ -3086,8 +3088,6 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, ...@@ -3086,8 +3088,6 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
skip)); skip));
if (current_function_check_memory_usage && ! in_check_memory_usage) if (current_function_check_memory_usage && ! in_check_memory_usage)
{ {
rtx target;
in_check_memory_usage = 1; in_check_memory_usage = 1;
target = copy_to_reg (temp); target = copy_to_reg (temp);
if (GET_CODE (x) == MEM && type && AGGREGATE_TYPE_P (type)) if (GET_CODE (x) == MEM && type && AGGREGATE_TYPE_P (type))
...@@ -3104,27 +3104,29 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, ...@@ -3104,27 +3104,29 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
in_check_memory_usage = 0; in_check_memory_usage = 0;
} }
/* TEMP is the address of the block. Copy the data there. */ target = gen_rtx_MEM (BLKmode, temp);
if (GET_CODE (size) == CONST_INT
&& MOVE_BY_PIECES_P ((unsigned) INTVAL (size), align))
{
rtx target = gen_rtx_MEM (BLKmode, temp);
if (type != 0) if (type != 0)
{
set_mem_attributes (target, type, 1); set_mem_attributes (target, type, 1);
/* Function incoming arguments may overlap with sibling call
outgoing arguments and we cannot allow reordering of reads
from function arguments with stores to outgoing arguments
of sibling calls. */
MEM_ALIAS_SET (target) = 0;
}
move_by_pieces (gen_rtx_MEM (BLKmode, temp), xinner, /* TEMP is the address of the block. Copy the data there. */
INTVAL (size), align); if (GET_CODE (size) == CONST_INT
&& MOVE_BY_PIECES_P ((unsigned) INTVAL (size), align))
{
move_by_pieces (target, xinner, INTVAL (size), align);
goto ret; goto ret;
} }
else else
{ {
rtx opalign = GEN_INT (align / BITS_PER_UNIT); rtx opalign = GEN_INT (align / BITS_PER_UNIT);
enum machine_mode mode; enum machine_mode mode;
rtx target = gen_rtx_MEM (BLKmode, temp);
if (type != 0)
set_mem_attributes (target, type, 1);
for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
mode != VOIDmode; mode != VOIDmode;
...@@ -3293,7 +3295,14 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, ...@@ -3293,7 +3295,14 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
dest = gen_rtx_MEM (mode, addr); dest = gen_rtx_MEM (mode, addr);
if (type != 0) if (type != 0)
{
set_mem_attributes (dest, type, 1); set_mem_attributes (dest, type, 1);
/* Function incoming arguments may overlap with sibling call
outgoing arguments and we cannot allow reordering of reads
from function arguments with stores to outgoing arguments
of sibling calls. */
MEM_ALIAS_SET (dest) = 0;
}
emit_move_insn (dest, x); emit_move_insn (dest, x);
......
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