PR target/16430
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Jul 2004 14:33:20 +0000 (14:33 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Jul 2004 14:33:20 +0000 (14:33 +0000)
* config/sparc/sparc.c (function_value): In 64-bit mode,
return the aggregates larger than 16 bytes like unions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84289 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sparc/sparc.c

index d9cf195..8e24df9 100644 (file)
@@ -1,5 +1,11 @@
 2004-07-08  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
+       PR target/16430
+       * config/sparc/sparc.c (function_value): In 64-bit mode,
+       return the aggregates larger than 16 bytes like unions.
+
+2004-07-08  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
        PR target/16199
        * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): When
        'temp' is zero, generate new pseudos as needed and emit the
index 02a8040..26c9e1e 100644 (file)
@@ -5750,6 +5750,18 @@ function_value (tree type, enum machine_mode mode, int incoming_p)
            abort (); /* shouldn't get here */
 
          mode = mode_for_size (bytes * BITS_PER_UNIT, MODE_INT, 0);
+
+         /* ??? We probably should have made the same ABI change in
+            3.4.0 as the one we made for unions.   The latter was
+            required by the SCD though, while the former is not
+            specified, so we favored compatibility and efficiency.
+
+            Now we're stuck for aggregates larger than 16 bytes,
+            because OImode vanished in the meantime.  Let's not
+            try to be unduly clever, and simply follow the ABI
+            for unions in that case.  */
+         if (mode == BLKmode)
+           return function_arg_union_value (bytes, mode, regbase);
        }
       else if (GET_MODE_CLASS (mode) == MODE_INT
               && GET_MODE_SIZE (mode) < UNITS_PER_WORD)