]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(emit_call_1): Put new function usage data at end of any data already
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 11 May 1994 20:22:02 +0000 (16:22 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 11 May 1994 20:22:02 +0000 (16:22 -0400)
there.

From-SVN: r7273

gcc/calls.c

index 4ca0483370307cb5e3d5261e3a69ed6c1e11b5c2..99c8a602bbb6a3972c33bf37721b8cf615bbcfa5 100644 (file)
@@ -408,8 +408,20 @@ emit_call_1 (funexp, funtype, stack_size, struct_value_size, next_arg_reg,
   if (! call_insn)
     abort ();
 
-  /* Put the register usage information on the CALL.  */
-  CALL_INSN_FUNCTION_USAGE (call_insn) = call_fusage;
+  /* Put the register usage information on the CALL.  If there is already
+     some usage information, put ours at the end.  */
+  if (CALL_INSN_FUNCTION_USAGE (call_insn))
+    {
+      rtx link;
+
+      for (link = CALL_INSN_FUNCTION_USAGE (call_insn); XEXP (link, 1) != 0;
+          link = XEXP (link, 1))
+       ;
+
+      XEXP (link, 1) = call_fusage;
+    }
+  else
+    CALL_INSN_FUNCTION_USAGE (call_insn) = call_fusage;
 
   /* If this is a const call, then set the insn's unchanging bit.  */
   if (is_const)