re PR target/61976 (aix64: Data corruption in struct passed by value)
authorDavid Edelsohn <dje.gcc@gmail.com>
Tue, 4 Dec 2018 15:51:51 +0000 (15:51 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Tue, 4 Dec 2018 15:51:51 +0000 (10:51 -0500)
        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

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 1214f4439978b3449f0c56bc250e77d865da496a..bbfe5ae30569deeae2e92c684a6aefe447dbd035 100644 (file)
@@ -1,3 +1,10 @@
+2018-12-04  David Edelsohn  <dje.gcc@gmail.com>
+
+       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  <vmakarov@redhat.com>
 
        PR target/88282
index 03b983b6d60f7e5af7fea2c03a6e040945993663..4e35a05bb38cc23878a057f05e0e1794fdd4261b 100644 (file)
@@ -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;