+2001-12-26 DJ Delorie <dj@redhat.com>
+
+ * function.c (expand_main_function): Make sure stack adjustments
+ happen before sjlj exception setup.
+
2001-12-26 David Edelsohn <edelsohn@gnu.org>
* rs6000.md (indirect_jump): Prefer CTR over LR.
if (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN)
{
int align = PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT;
- rtx tmp;
+ rtx tmp, seq;
+ start_sequence ();
/* Forcibly align the stack. */
#ifdef STACK_GROWS_DOWNWARD
tmp = expand_simple_binop (Pmode, AND, stack_pointer_rtx, GEN_INT(-align),
/* Enlist allocate_dynamic_stack_space to pick up the pieces. */
tmp = force_reg (Pmode, const0_rtx);
allocate_dynamic_stack_space (tmp, NULL_RTX, BIGGEST_ALIGNMENT);
+ seq = gen_sequence ();
+ end_sequence ();
+
+ for (tmp = get_last_insn (); tmp; tmp = PREV_INSN (tmp))
+ if (NOTE_P (tmp) && NOTE_LINE_NUMBER (tmp) == NOTE_INSN_FUNCTION_BEG)
+ break;
+ if (tmp)
+ emit_insn_before (seq, tmp);
+ else
+ emit_insn (seq);
}
#endif