summaryrefslogtreecommitdiff
path: root/gcc/config/pdp11/pdp11.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-11-01 23:29:52 -0400
committerJason Merrill <jason@redhat.com>2010-11-01 23:32:03 -0400
commitd29b209e37cb85fdf1cb1d8e0ae263cc3c59312b (patch)
tree0e6b797a6c1a23c50603805706926a5eaa2184f1 /gcc/config/pdp11/pdp11.c
parent2450a78a38a727e7ec673b132315c8379db3b27d (diff)
parentc0000147b2aef6b69e2c6b6d29a9963910f6da98 (diff)
downloadgcc-constexpr.tar.gz
Merge remote branch 'trunk' into constexprconstexpr
Diffstat (limited to 'gcc/config/pdp11/pdp11.c')
-rw-r--r--gcc/config/pdp11/pdp11.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c
index 946d7ed973b..5b5ebebe0e5 100644
--- a/gcc/config/pdp11/pdp11.c
+++ b/gcc/config/pdp11/pdp11.c
@@ -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.