- /* If we added a variable amount to SIZE,
- we can no longer assume it is aligned. */
-#if !defined (SETJMP_VIA_SAVE_AREA)
- if (MUST_ALIGN || known_align % PREFERRED_STACK_BOUNDARY != 0)
+ target = gen_reg_rtx (Pmode);
+
+ /* The size is supposed to be fully adjusted at this point so record it
+ if stack usage info is requested. */
+ if (flag_stack_usage_info)
+ {
+ current_function_dynamic_stack_size += stack_usage_size;
+
+ /* ??? This is gross but the only safe stance in the absence
+ of stack usage oriented flow analysis. */
+ if (!cannot_accumulate)
+ current_function_has_unbounded_dynamic_stack_size = 1;
+ }
+
+ final_label = NULL_RTX;
+ final_target = NULL_RTX;
+
+ /* If we are splitting the stack, we need to ask the backend whether
+ there is enough room on the current stack. If there isn't, or if
+ the backend doesn't know how to tell is, then we need to call a
+ function to allocate memory in some other way. This memory will
+ be released when we release the current stack segment. The
+ effect is that stack allocation becomes less efficient, but at
+ least it doesn't cause a stack overflow. */
+ if (flag_split_stack)
+ {
+ rtx available_label, ask, space, func;
+
+ available_label = NULL_RTX;
+
+#ifdef HAVE_split_stack_space_check
+ if (HAVE_split_stack_space_check)
+ {
+ available_label = gen_label_rtx ();
+
+ /* This instruction will branch to AVAILABLE_LABEL if there
+ are SIZE bytes available on the stack. */
+ emit_insn (gen_split_stack_space_check (size, available_label));
+ }