From: Richard Kenner Date: Fri, 12 Aug 1994 22:59:14 +0000 (-0400) Subject: (expand_function_start): Add redundant copy to static_chain_incoming_rtx if... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=426749e8af8eb4b0838ea81aaa9c41138ff160de;p=gcc.git (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 --- 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;