diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1993-04-12 12:48:02 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1993-04-12 12:48:02 -0700 |
commit | 5460015decdcce33e95c60aba3a66897178bd953 (patch) | |
tree | cf21afceda4685b70d8388272ebfc734b672963e /gcc/explow.c | |
parent | b76478952ba40bfb81febeeb3f76983b53cdff5e (diff) | |
download | gcc-5460015decdcce33e95c60aba3a66897178bd953.zip gcc-5460015decdcce33e95c60aba3a66897178bd953.tar.gz gcc-5460015decdcce33e95c60aba3a66897178bd953.tar.bz2 |
(emit_stack_save): At end, call validize_mem when inside sequence.
From-SVN: r4104
Diffstat (limited to 'gcc/explow.c')
-rw-r--r-- | gcc/explow.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/explow.c b/gcc/explow.c index 91cb743..f13129f 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -748,21 +748,26 @@ emit_stack_save (save_level, psave, after) abort (); } - if (sa != 0) - sa = validize_mem (sa); - if (after) { rtx seq; start_sequence (); + /* We must validize inside the sequence, to ensure that any instructions + created by the validize call also get moved to the right place. */ + if (sa != 0) + sa = validize_mem (sa); emit_insn (fcn (sa, stack_pointer_rtx)); seq = gen_sequence (); end_sequence (); emit_insn_after (seq, after); } else - emit_insn (fcn (sa, stack_pointer_rtx)); + { + if (sa != 0) + sa = validize_mem (sa); + emit_insn (fcn (sa, stack_pointer_rtx)); + } } /* Restore the stack pointer for the purpose in SAVE_LEVEL. SA is the save |