[PATCH] Drop excess size used for run time allocated stack variables.

Dominik Vogt vogt@linux.vnet.ibm.com
Mon May 2 13:43:00 GMT 2016


>  static rtx
> -round_push (rtx size)
> +round_push (rtx size, int already_added)

round_push also needs to know about the required alignment in case
that is more strict than a simple stack slot alignment.

>  {
> -  rtx align_rtx, alignm1_rtx;
> +  rtx align_rtx, add_rtx;
>  
>    if (!SUPPORTS_STACK_ALIGNMENT
>        || crtl->preferred_stack_boundary == MAX_SUPPORTED_STACK_ALIGNMENT)
>      {
>        int align = crtl->preferred_stack_boundary / BITS_PER_UNIT;

=>

  int align = MAX (required_align,
                   crtl->preferred_stack_boundary) / BITS_PER_UNIT;

Unfortunately the testsuite didn't detect this bug; it showed up
while testing anothe patch related to stack layout.  I'm testing
the modified patch right now.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany



More information about the Gcc-patches mailing list