aboutsummaryrefslogtreecommitdiff
path: root/gcc/explow.c
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2002-08-14 17:41:52 +0000
committerDale Johannesen <dalej@gcc.gnu.org>2002-08-14 17:41:52 +0000
commit260f91c2927c3850919f8ebdcbc294cfbd04daa9 (patch)
treeb89a47d1833a43c5e6808e162a723c626e81adbb /gcc/explow.c
parent615d009f6d673f288348c4394d36da2fb0dbbcc8 (diff)
downloadgcc-260f91c2927c3850919f8ebdcbc294cfbd04daa9.zip
gcc-260f91c2927c3850919f8ebdcbc294cfbd04daa9.tar.gz
gcc-260f91c2927c3850919f8ebdcbc294cfbd04daa9.tar.bz2
Insert memory clobbers before the code that pops variable arrays.
This prevents the scheduler from moving references to the arrays below the stack pop. From-SVN: r56328
Diffstat (limited to 'gcc/explow.c')
-rw-r--r--gcc/explow.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/explow.c b/gcc/explow.c
index 1d27640..f61d009 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -1079,7 +1079,17 @@ emit_stack_restore (save_level, sa, after)
}
if (sa != 0)
- sa = validize_mem (sa);
+ {
+ sa = validize_mem (sa);
+ /* These clobbers prevent the scheduler from moving
+ references to variable arrays below the code
+ that deletes (pops) the arrays. */
+ emit_insn (gen_rtx_CLOBBER (VOIDmode,
+ gen_rtx_MEM (BLKmode,
+ gen_rtx_SCRATCH (VOIDmode))));
+ emit_insn (gen_rtx_CLOBBER (VOIDmode,
+ gen_rtx_MEM (BLKmode, stack_pointer_rtx)));
+ }
if (after)
{