aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2000-06-23 12:03:42 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2000-06-23 12:03:42 +0200
commit7ab923ccffee2b00e18580a21e54cee3f3a0c24c (patch)
tree6b098c9cc6213a7d7fc73ae01e41aebcd5252b5a
parent054451eaca6db3e5347180411e0c84cc84191a49 (diff)
downloadgcc-7ab923ccffee2b00e18580a21e54cee3f3a0c24c.zip
gcc-7ab923ccffee2b00e18580a21e54cee3f3a0c24c.tar.gz
gcc-7ab923ccffee2b00e18580a21e54cee3f3a0c24c.tar.bz2
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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/calls.c7
-rw-r--r--gcc/expr.c37
3 files changed, 36 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f0062aa..4a37027 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+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>
* config/ia64/ia64.md (pred_rel_mutex): Only take one register.
diff --git a/gcc/calls.c b/gcc/calls.c
index 5892cba..3561f59 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -1595,6 +1595,13 @@ compute_argument_addresses (args, argblock, num_actuals)
args[i].stack_slot = gen_rtx_MEM (args[i].mode, addr);
set_mem_attributes (args[i].stack_slot,
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;
}
}
}
diff --git a/gcc/expr.c b/gcc/expr.c
index c981580..07fa592 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -3052,6 +3052,8 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
else
#endif /* PUSH_ROUNDING */
{
+ rtx target;
+
/* Otherwise make space on the stack and copy the data
to the address of that space. */
@@ -3086,8 +3088,6 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
skip));
if (current_function_check_memory_usage && ! in_check_memory_usage)
{
- rtx target;
-
in_check_memory_usage = 1;
target = copy_to_reg (temp);
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,
in_check_memory_usage = 0;
}
+ target = gen_rtx_MEM (BLKmode, temp);
+
+ if (type != 0)
+ {
+ 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;
+ }
+
/* TEMP is the address of the block. Copy the data there. */
if (GET_CODE (size) == CONST_INT
&& MOVE_BY_PIECES_P ((unsigned) INTVAL (size), align))
{
- rtx target = gen_rtx_MEM (BLKmode, temp);
-
- if (type != 0)
- set_mem_attributes (target, type, 1);
-
- move_by_pieces (gen_rtx_MEM (BLKmode, temp), xinner,
- INTVAL (size), align);
+ move_by_pieces (target, xinner, INTVAL (size), align);
goto ret;
}
else
{
rtx opalign = GEN_INT (align / BITS_PER_UNIT);
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);
mode != VOIDmode;
@@ -3293,7 +3295,14 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
dest = gen_rtx_MEM (mode, addr);
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);