From: Jim Wilson Date: Mon, 8 Jul 1996 21:55:32 +0000 (-0700) Subject: (function_arg): Add explicit checks for FIELD_DECLs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f7a61b839f7d938fc37a9b9fd671bbd7800f1d09;p=gcc.git (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 --- diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 06d57cc0459..fc8caca07d8 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)));