(expand_function_start): Add redundant copy to static_chain_incoming_rtx if...
authorRichard Kenner <kenner@gcc.gnu.org>
Fri, 12 Aug 1994 22:59:14 +0000 (18:59 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Fri, 12 Aug 1994 22:59:14 +0000 (18:59 -0400)
(expand_function_start): Add redundant copy to
static_chain_incoming_rtx if SMALL_REGISTER_CLASS so inlining works
properly.

From-SVN: r7909

gcc/function.c

index e482f1da4814a6f8c6ba1c590dc8a2737036a4b9..947972f5f9e2e52c9b4355fc2e90a5d9f5cc39d2 100644 (file)
@@ -4972,11 +4972,14 @@ expand_function_start (subr, parms_have_cleanups)
   if (tem && ! obey_regdecls)
     {
 #ifdef SMALL_REGISTER_CLASSES
+      /* If the static chain originally came in a register, put it back
+        there, then move it out in the next insn.  The reason for
+        this peculiar code is to satisfy function integration.  */
       if (GET_CODE (static_chain_incoming_rtx) == REG)
-       last_ptr = copy_to_reg (last_ptr);
-      else
+       emit_move_insn (static_chain_incoming_rtx, last_ptr);
 #endif
-       last_ptr = copy_to_reg (static_chain_incoming_rtx);
+
+      last_ptr = copy_to_reg (static_chain_incoming_rtx);
     }
 
   context_display = 0;