From 426749e8af8eb4b0838ea81aaa9c41138ff160de Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 12 Aug 1994 18:59:14 -0400 Subject: [PATCH] (expand_function_start): Add redundant copy to static_chain_incoming_rtx if... (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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gcc/function.c b/gcc/function.c index e482f1da481..947972f5f9e 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -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; -- 2.30.2