On Fri, May 06, 2016 at 03:54:43PM +0930, Alan Modra wrote:
> Revision 235792 regressed compat/scalar-by-value-6 for powerpc-linux
> -m32 due to accidentally changing the ABI.  By another historical
> accident, complex long double is stupidly passed in gprs for -m32.
> 
> Bootstrapped and regression tested powerpc64-linux.  Also fixes
> gfortran.dg/{large_real_kind_2.F90,large_real_kind_form_io_1.f90}.
> OK to apply?

>       * config/rs6000/rs6000.c (rs6000_function_arg): Exclude IBM
>       complex long double from args passed in fprs for ABI_V4.
>       (rs6000_function_arg_boundary, rs6000_function_arg_advance_1,
>       rs6000_gimplify_va_arg): Likewise.
> 
> diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
> index 1215925..9c7a37b 100644
> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -10142,6 +10142,7 @@ rs6000_function_arg_boundary (machine_mode mode, 
> const_tree type)
>        && (GET_MODE_SIZE (mode) == 8
>         || (TARGET_HARD_FLOAT
>             && TARGET_FPRS
> +           && !(mode == ICmode || (!TARGET_IEEEQUAD && mode == TCmode))
>             && FLOAT128_2REG_P (mode))))

Since this monstruous, unreadable condition is used a lot, use a nicely named
helper function instead?


Segher

Reply via email to