From 5460015decdcce33e95c60aba3a66897178bd953 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Mon, 12 Apr 1993 12:48:02 -0700 Subject: (emit_stack_save): At end, call validize_mem when inside sequence. From-SVN: r4104 --- gcc/explow.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gcc') 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 -- cgit v1.1