diff options
author | Jakub Jelinek <jakub@redhat.com> | 2000-06-23 12:03:42 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2000-06-23 12:03:42 +0200 |
commit | 7ab923ccffee2b00e18580a21e54cee3f3a0c24c (patch) | |
tree | 6b098c9cc6213a7d7fc73ae01e41aebcd5252b5a /gcc/expr.c | |
parent | 054451eaca6db3e5347180411e0c84cc84191a49 (diff) | |
download | gcc-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
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 37 |
1 files changed, 23 insertions, 14 deletions
@@ -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); |