This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [alpha] hookize FUNCTION_ARG &co.
- From: Richard Henderson <rth at redhat dot com>
- To: Nathan Froyd <froydnj at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 08 Oct 2010 08:24:47 -0700
- Subject: Re: [alpha] hookize FUNCTION_ARG &co.
- References: <1286546300-17366-1-git-send-email-froydnj@codesourcery.com>
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~