OSDN Git Service

(function_arg): Add explicit checks for FIELD_DECLs.
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Jul 1996 21:55:32 +0000 (21:55 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Jul 1996 21:55:32 +0000 (21:55 +0000)
(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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12411 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/mips/mips.md

index 06d57cc..fc8caca 100644 (file)
@@ -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)));