Commit f7a61b83 by Jim Wilson

(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
parent a1616dd9
......@@ -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)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment