OSDN Git Service

(expand_value_return): Handle PARALLEL return_reg.
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Jun 1996 23:14:12 +0000 (23:14 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Jun 1996 23:14:12 +0000 (23:14 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12192 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/stmt.c

index d9551f6..687520e 100644 (file)
@@ -2529,6 +2529,21 @@ expand_value_return (val)
   if (GET_CODE (return_reg) == REG
       && REGNO (return_reg) < FIRST_PSEUDO_REGISTER)
     emit_insn (gen_rtx (USE, VOIDmode, return_reg));
+  /* Handle calls that return values in multiple non-contiguous locations.
+     The Irix 6 ABI has examples of this.  */
+  else if (GET_CODE (return_reg) == PARALLEL)
+    {
+      int i;
+
+      for (i = 0; i < XVECLEN (return_reg, 0); i++)
+       {
+         rtx x = XEXP (XVECEXP (return_reg, 0, i), 0);
+
+         if (GET_CODE (x) == REG
+             && REGNO (x) < FIRST_PSEUDO_REGISTER)
+           emit_insn (gen_rtx (USE, VOIDmode, x));
+       }
+    }
 
   /* Does any pending block have cleanups?  */