This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, committed] SFmode arg padding and va_arg cleanup


On Wed, Jul 14, 2004 at 11:01:09AM -0400, David Edelsohn wrote:
> --- rs6000.c	13 Jul 2004 07:45:04 -0000	1.665
> +++ rs6000.c	14 Jul 2004 13:59:47 -0000
> @@ -4593,6 +4593,10 @@ function_arg_padding (enum machine_mode 
>  	return upward;
>      }
>  
> +  /* SFmode parameters are not padded.  */
> +  if (TARGET_64BIT && mode == SFmode)
> +    return none;
> +
>    /* Fall back to the default.  */
>    return DEFAULT_FUNCTION_ARG_PADDING (mode, type);
>  }

Hmm, shouldn't this be

  /* SFmode parameters are padded upwards.  */
  if (mode == SFmode)
    return upward;

We really do have padding on a ppc64 SFmode arg, so returning "none" is
confusing, and I suspect will result in locate_and_pad_parm calculating
a wrong "sizetree".

It's also not necessary to test for TARGET_64BIT since the return value
of function_arg_padding only matters when in fact there is padding.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]