rs6000.c (rs6000_mixed_function_arg): Correct no_units calculation.
authorFariborz Jahanian <fjahanian@apple.com>
Sat, 1 Nov 2003 22:00:33 +0000 (22:00 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Sat, 1 Nov 2003 22:00:33 +0000 (17:00 -0500)
        * config/rs6000/rs6000.c (rs6000_mixed_function_arg): Correct
        no_units calculation.

From-SVN: r73182

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

index bb6e8fd657fd848381140a378bd535f77be4d40f..a15320eb514c04ba348a48d4b9927e1285b76c42 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-01  Fariborz Jahanian  <fjahanian@apple.com>
+
+       * config/rs6000/rs6000.c (rs6000_mixed_function_arg): Correct
+       no_units calculation.
+
 2003-11-01  Andreas Jaeger  <aj@suse.de>
 
        * unwind-dw2.c (_Unwind_FrameState): Remove commas at end of
index 5abfc095aa6421de0caf1848f10d39533dcaa229..8c042b5ba6266d93e8238c993090861cd4fb48d2 100644 (file)
@@ -4017,7 +4017,7 @@ rs6000_mixed_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
     {
       int k;
       int size = int_size_in_bytes (type);
-      int no_units = size / 4;
+      int no_units = ((size - 1) / 4) + 1;
       int max_no_words = GP_ARG_NUM_REG - align_words;
       int rtlvec_len = no_units < max_no_words ? no_units : max_no_words;
       rtx *rtlvec = (rtx *) alloca (rtlvec_len * sizeof (rtx));