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: [alpha] hookize FUNCTION_ARG &co.


On 10/08/2010 06:58 AM, Nathan Froyd wrote:
> 	* config/alpha/alpha-protos.h (function_arg): Delete.
> 	* config/alpha/alpha.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
> 	* config/alpha/vms.h (FUNCTION_ARG_ADVANCE): Delete.
> 	* config/alpha/alpha.c (function_arg): Rename to...
> 	(alpha_function_arg): ...this.  Make static.  Take a const_tree and
> 	a bool.  Delete TARGET_ABI_UNICOSMK code.
> 	(alpha_function_arg_advance): New function.
> 	(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.

Ok with,

> +alpha_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
> +			    const_tree type, bool named)
> +{
> +#if TARGET_ABI_OPEN_VMS
> +  if (targetm.calls.must_pass_in_stack (mode, type))
> +    cum->num_args += 6;
> +  else
> +    {
> +      if (cum->num_args < 6)
> +	cum->atypes[cum->num_args] = alpha_arg_type (mode);
> +
> +      cum->num_args += ALPHA_ARG_SIZE (mode, type, named);
> +    }
> +#elif TARGET_ABI_OSF
> +  *cum += (targetm.calls.must_pass_in_stack (mode, type)
> +	   ? 6
> +	   : ALPHA_ARG_SIZE (mode, type, named));
> +#else
> +#error Unhandled ABI
> +#endif

Move the TARGET_ABI_OPEN_VMS in, around the atypes bit.
That shares the common code along the vms/osf paths.
Don't bother with the #error.


r~


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