From: David Edelsohn Date: Tue, 4 Dec 2018 15:51:51 +0000 (+0000) Subject: re PR target/61976 (aix64: Data corruption in struct passed by value) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b1e2e9063fc3e3ca32a91afeb3c8069586e15ddc;p=gcc.git re PR target/61976 (aix64: Data corruption in struct passed by value) PR target/61976 * config/rs6000/rs6000.c (rs6000_function_arg): Don't pass aggregates in FPRs on AIX. (rs6000_arg_partial_bytes): Same. From-SVN: r266786 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1214f443997..bbfe5ae3056 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-12-04 David Edelsohn + + PR target/61976 + * config/rs6000/rs6000.c (rs6000_function_arg): Don't pass aggregates + in FPRs on AIX. + (rs6000_arg_partial_bytes): Same. + 2018-12-04 Vladimir Makarov PR target/88282 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 03b983b6d60..4e35a05bb38 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -11989,7 +11989,8 @@ rs6000_function_arg (cumulative_args_t cum_v, machine_mode mode, if (elt_mode == TDmode && (cum->fregno % 2) == 1) cum->fregno++; - if (USE_FP_FOR_ARG_P (cum, elt_mode)) + if (USE_FP_FOR_ARG_P (cum, elt_mode) + && !(TARGET_AIX && AGGREGATE_TYPE_P (type))) { rtx rvec[GP_ARG_NUM_REG + AGGR_ARG_NUM_REG + 1]; rtx r, off; @@ -12125,7 +12126,8 @@ rs6000_arg_partial_bytes (cumulative_args_t cum_v, machine_mode mode, align_words = rs6000_parm_start (mode, type, cum->words); - if (USE_FP_FOR_ARG_P (cum, elt_mode)) + if (USE_FP_FOR_ARG_P (cum, elt_mode) + && !(TARGET_AIX && AGGREGATE_TYPE_P (type))) { unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;