diff options
author | Kazu Hirata <kazu@codesourcery.com> | 2007-01-18 19:54:44 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2007-01-18 19:54:44 +0000 |
commit | 576c9028f00d275eb9beb66ab2116383759130bb (patch) | |
tree | f226a49f2943bd53650b7a718323a484610cf83f /gcc/calls.c | |
parent | dfd050746b226f24b1e4ae35ad06d71ecd77bd04 (diff) | |
download | gcc-576c9028f00d275eb9beb66ab2116383759130bb.zip gcc-576c9028f00d275eb9beb66ab2116383759130bb.tar.gz gcc-576c9028f00d275eb9beb66ab2116383759130bb.tar.bz2 |
200x-xx-xx Kazu Hirata <kazu@codesourcery.com> Richard Sandiford <richard@codesourcery.com>
gcc/
200x-xx-xx Kazu Hirata <kazu@codesourcery.com>
Richard Sandiford <richard@codesourcery.com>
* doc/tm.texi (TARGET_FUNCTION_VALUE): Expand documentation of
parallels.
* calls.c (expand_call): If the return value is a PARALLEL,
extract its first member.
* config/m68k/linux.h (FUNCTION_EXTRA_EPILOGUE): Remove.
* config/m68k/m68k.c (m68k_output_function_epilogue): Don't
use FUNCTION_EXTRA_EPILOGUE.
(m68k_function_value): Return a PARALLEL if the return value
is of a pointer type.
* config/m68k/netbsd-elf.h (current_function_returns_pointer)
(FUNCTION_EXTRA_EPILOGUE): Remove.
* config/m68k/m68k.md (D0_REG): New constant.
Co-Authored-By: Richard Sandiford <richard@codesourcery.com>
From-SVN: r120929
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index c0d1f8c..0ca03f8 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -2566,6 +2566,19 @@ expand_call (tree exp, rtx target, int ignore) else valreg = hard_function_value (TREE_TYPE (exp), fndecl, fntype, (pass == 0)); + + /* If VALREG is a PARALLEL whose first member has a zero + offset, use that. This is for targets such as m68k that + return the same value in multiple places. */ + if (GET_CODE (valreg) == PARALLEL) + { + rtx elem = XVECEXP (valreg, 0, 0); + rtx where = XEXP (elem, 0); + rtx offset = XEXP (elem, 1); + if (offset == const0_rtx + && GET_MODE (where) == GET_MODE (valreg)) + valreg = where; + } } /* Precompute all register parameters. It isn't safe to compute anything |