diff options
author | dalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-14 17:41:52 +0000 |
---|---|---|
committer | dalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-14 17:41:52 +0000 |
commit | 62ede4837f265a37a713aa9c78b863e0197bb3af (patch) | |
tree | b89a47d1833a43c5e6808e162a723c626e81adbb /gcc/explow.c | |
parent | 58f905d01320e4706adbe5dff500137e4b8f0364 (diff) | |
download | gcc-62ede4837f265a37a713aa9c78b863e0197bb3af.tar.gz |
Insert memory clobbers before the code that pops variable arrays.
This prevents the scheduler from moving references to the arrays
below the stack pop.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56328 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/explow.c')
-rw-r--r-- | gcc/explow.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/explow.c b/gcc/explow.c index 1d2764064e1..f61d009105a 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) { |