Commit ac9e20f0 by Richard Kenner

(expand_function_start): Only use static_chain_incoming_rtx once if it

is a REG and we have SMALL_REGISTER_CLASSES.

From-SVN: r7873
parent 580d3230
...@@ -4965,11 +4965,20 @@ expand_function_start (subr, parms_have_cleanups) ...@@ -4965,11 +4965,20 @@ expand_function_start (subr, parms_have_cleanups)
/* Fetch static chain values for containing functions. */ /* Fetch static chain values for containing functions. */
tem = decl_function_context (current_function_decl); tem = decl_function_context (current_function_decl);
/* If not doing stupid register allocation, then start off with the static /* If not doing stupid register allocation copy the static chain
chain pointer in a pseudo register. Otherwise, we use the stack pointer into a psuedo. If we have small register classes, copy the
address that was generated above. */ value from memory if static_chain_incoming_rtx is a REG. If we do
stupid register allocation, we use the stack address generated above. */
if (tem && ! obey_regdecls) if (tem && ! obey_regdecls)
last_ptr = copy_to_reg (static_chain_incoming_rtx); {
#ifdef SMALL_REGISTER_CLASSES
if (GET_CODE (static_chain_incoming_rtx) == REG)
last_ptr = copy_to_reg (last_ptr);
else
#endif
last_ptr = copy_to_reg (static_chain_incoming_rtx);
}
context_display = 0; context_display = 0;
while (tem) while (tem)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment