pdp11.c (pdp11_return_in_memory): Return vector and complex modes in memory.
authorPaul Koning <ni1d@arrl.net>
Mon, 1 Nov 2010 18:08:15 +0000 (14:08 -0400)
committerPaul Koning <pkoning@gcc.gnu.org>
Mon, 1 Nov 2010 18:08:15 +0000 (14:08 -0400)
* config/pdp11/pdp11.c (pdp11_return_in_memory): Return vector and
complex modes in memory.

From-SVN: r166137

gcc/ChangeLog
gcc/config/pdp11/pdp11.c

index 5017eb3f300fbb264c584040f9f25c369d939e7d..c267b92630c6d86980903500f3262f70ca2b4fec 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-01  Paul Koning  <ni1d@arrl.net>
+
+       * config/pdp11/pdp11.c (pdp11_return_in_memory): Return vector and
+       complex modes in memory.
+
 2010-11-01  Nathan Froyd  <froydnj@codesourcery.com>
 
        * tree.c (build_vector_from_val): Use useless_type_conversion_p.
index 946d7ed973b8b2af6e4973f8bf75bc0e522601be..5b5ebebe0e5dd5aff402c174ef45d675f2d1944b 100644 (file)
@@ -1816,14 +1816,12 @@ output_addr_const_pdp11 (FILE *file, rtx x)
 static bool
 pdp11_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
-  /* Should probably return DImode and DFmode in memory, lest
-     we fill up all regs!
-
-     have to, else we crash - exception: maybe return result in 
-     ac0 if DFmode and FPU present - compatibility problem with
-     libraries for non-floating point....  */
+  /* Integers 32 bits and under, and scalar floats (if FPU), are returned
+     in registers.  The rest go into memory.  */
   return (TYPE_MODE (type) == DImode
-         || (FLOAT_MODE_P (TYPE_MODE (type)) && ! TARGET_AC0));
+         || (FLOAT_MODE_P (TYPE_MODE (type)) && ! TARGET_AC0)
+         || TREE_CODE (type) == VECTOR_TYPE
+         || COMPLEX_MODE_P (TYPE_MODE (type)));
 }
 
 /* Worker function for TARGET_FUNCTION_VALUE.