------- Comment #11 from hjl dot tools at gmail dot com  2010-08-09 17:01 
-------
(In reply to comment #9)
> Does this patch:
> 
> --
> diff --git a/gcc/calls.c b/gcc/calls.c
> index cd0d9c5..cbb0944 100644
> --- a/gcc/calls.c
> +++ b/gcc/calls.c
> @@ -2846,7 +2846,8 @@ expand_call (tree exp, rtx target, int ignore)
> 
>        /* Stack must be properly aligned now.  */
>        gcc_assert (!pass
> -       || !(stack_pointer_delta % preferred_unit_stack_boundary));
> +       || !(stack_pointer_delta
> +            % (PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT)));
> 
>        /* Generate the actual call instruction.  */
>        emit_call_1 (funexp, exp, fndecl, funtype, unadjusted_args_size,
> --
> 
> make any senses?
> 

This is incorrect. If SUPPORTS_STACK_ALIGNMENT is true, expand_call needs
to check stack_pointer_delta and preferred_unit_stack_boundary, and adjust
stack is needed before expanding call if needed.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45234

Reply via email to