Commit c070a3b9 by Ian Lance Taylor Committed by Ian Lance Taylor

explow.c (allocate_dynamic_stack_space): Check MALLOC_ABI_ALIGNMENT.

	* explow.c (allocate_dynamic_stack_space): Check
	MALLOC_ABI_ALIGNMENT.

From-SVN: r166393
parent cde99631
2010-11-05 Ian Lance Taylor <iant@google.com>
* explow.c (allocate_dynamic_stack_space): Check
MALLOC_ABI_ALIGNMENT.
2010-11-05 Jakub Jelinek <jakub@redhat.com> 2010-11-05 Jakub Jelinek <jakub@redhat.com>
PR c/44772 PR c/44772
...@@ -1356,13 +1356,18 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align, ...@@ -1356,13 +1356,18 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align,
#endif #endif
/* The __morestack_allocate_stack_space function will allocate /* The __morestack_allocate_stack_space function will allocate
memory using malloc. We don't know that the alignment of the memory using malloc. If the alignment of the memory returned
memory returned by malloc will meet REQUIRED_ALIGN. Increase by malloc does not meet REQUIRED_ALIGN, we increase SIZE to
SIZE to make sure we allocate enough space. */ make sure we allocate enough space. */
ask = expand_binop (Pmode, add_optab, size, if (MALLOC_ABI_ALIGNMENT >= required_align)
GEN_INT (required_align / BITS_PER_UNIT - 1), ask = size;
NULL_RTX, 1, OPTAB_LIB_WIDEN); else
must_align = true; {
ask = expand_binop (Pmode, add_optab, size,
GEN_INT (required_align / BITS_PER_UNIT - 1),
NULL_RTX, 1, OPTAB_LIB_WIDEN);
must_align = true;
}
func = init_one_libfunc ("__morestack_allocate_stack_space"); func = init_one_libfunc ("__morestack_allocate_stack_space");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment