This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, rs6000] ELFv2 ABI preparation: Refactor rs6000_function_arg
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 13 Nov 2013 19:58:18 -0500
- Subject: Re: [PATCH, rs6000] ELFv2 ABI preparation: Refactor rs6000_function_arg
- Authentication-results: sourceware.org; auth=none
* config/rs6000/rs6000.c (rs6000_psave_function_arg): New function.
(rs6000_function_arg): Use rs6000_psave_function_arg and
rs6000_finish_function_arg to handle both vector and floating
point arguments that are also passed in GPRs / the stack.
This is okay, but
@@ -9711,85 +9781,33 @@ rs6000_function_arg (cumulative_args_t c
rtx rvec[GP_ARG_NUM_REG + 1];
- int k;
- bool needs_psave;
- enum machine_mode fmode = mode;
+ int k = 0;
unsigned long n_fpreg = (GET_MODE_SIZE (mode) + 7) >> 3;
+ /* Do we also need to pass this argument in the parameter
+ save area? */
+ if (type && (cum->nargs_prototype <= 0
+ || (DEFAULT_ABI == ABI_AIX
+ && TARGET_XL_COMPAT
+ && align_words >= GP_ARG_NUM_REG)))
+ k = rs6000_psave_function_arg (mode, type, align_words, rvec);
+ /* Describe where this argument goes in the fprs. */
+ /* Check if the argument is split over registers and memory.
+ This can only ever happen for long double or _Decimal128;
+ complex types are handled via split_complex_arg. */
+ enum machine_mode fmode = mode;
Why did you move the declaration of fmode away from the beginning of
the scope block? C++ and C99 accept it, but I would prefer it in the
beginning of the block.