aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@gcc.gnu.org>2005-02-02 21:55:32 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2005-02-02 21:55:32 +0000
commitb5870beeee4a54ffbbc0d7fa75ffe74c6804b09e (patch)
tree3dc39e65d74e62e3e7f92a5aa0b31c606c092e21
parentcf676baa3c17d4d427002e1766756f98398c9a29 (diff)
downloadgcc-b5870beeee4a54ffbbc0d7fa75ffe74c6804b09e.zip
gcc-b5870beeee4a54ffbbc0d7fa75ffe74c6804b09e.tar.gz
gcc-b5870beeee4a54ffbbc0d7fa75ffe74c6804b09e.tar.bz2
rs6000.c (rs6000_spe_function_arg): Multi-reg arguments go on the stack.
* config/rs6000/rs6000.c (rs6000_spe_function_arg): Multi-reg arguments go on the stack. Do not put complex doubles in odd/even pairs. From-SVN: r94617
-rw-r--r--gcc/config/rs6000/rs6000.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index ccf9ace..4406f1b 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -5170,11 +5170,14 @@ rs6000_spe_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
are passed and returned in a pair of GPRs for ABI compatibility. */
if (TARGET_E500_DOUBLE && (mode == DFmode || mode == DCmode))
{
+ int n_words = rs6000_arg_size (mode, type);
+
/* Doubles go in an odd/even register pair (r5/r6, etc). */
- gregno += (1 - gregno) & 1;
+ if (mode == DFmode)
+ gregno += (1 - gregno) & 1;
- /* We do not split between registers and stack. */
- if (gregno + 1 > GP_ARG_MAX_REG)
+ /* Multi-reg args are not split between registers and stack. */
+ if (gregno + n_words - 1 > GP_ARG_MAX_REG)
return NULL_RTX;
return spe_build_register_parallel (mode, gregno);