aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1996-07-08 14:55:32 -0700
committerJim Wilson <wilson@gcc.gnu.org>1996-07-08 14:55:32 -0700
commitf7a61b839f7d938fc37a9b9fd671bbd7800f1d09 (patch)
tree4829ac5cfe8cf62a16daf15ad7c18dc576bfb526
parenta1616dd9e81f077a581da475d45d379d7959fb04 (diff)
downloadgcc-f7a61b839f7d938fc37a9b9fd671bbd7800f1d09.zip
gcc-f7a61b839f7d938fc37a9b9fd671bbd7800f1d09.tar.gz
gcc-f7a61b839f7d938fc37a9b9fd671bbd7800f1d09.tar.bz2
(function_arg): Add explicit checks for FIELD_DECLs.
(mips_function_value): Add explicit checks for FIELD_DECLs, and save them in the array FIELDS. When returning structure with 1 float field, enclose it in a PARALLEL and set the PARALLEL mode correctly. * mips/mips.md (call_value): Call gen_call_value_multiple_internal0 only if there are multiple return values. Strip the PARALLEL off if there there is only one return value. From-SVN: r12411
-rw-r--r--gcc/config/mips/mips.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 06d57cc..fc8caca 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -6496,7 +6496,7 @@ move\\t%0,%z4\\n\\
/* Handle Irix6 function calls that have multiple non-contiguous
results. */
- if (GET_CODE (operands[0]) == PARALLEL)
+ if (GET_CODE (operands[0]) == PARALLEL && XVECLEN (operands[0], 0) > 1)
{
emit_call_insn (gen_call_value_multiple_internal0
(XEXP (XVECEXP (operands[0], 0, 0), 0),
@@ -6506,6 +6506,11 @@ move\\t%0,%z4\\n\\
DONE;
}
+ /* We have a call returning a DImode structure in an FP reg.
+ Strip off the now unnecessary PARALLEL. */
+ if (GET_CODE (operands[0]) == PARALLEL)
+ operands[0] = XEXP (XVECEXP (operands[0], 0, 0), 0);
+
emit_call_insn (gen_call_value_internal0 (operands[0], operands[1], operands[2],
gen_rtx (REG, SImode, GP_REG_FIRST + 31)));