diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-06-23 23:45:23 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-06-23 23:45:23 +0000 |
commit | 3c7341749fd1a7007d577c9b92ba9a97365f0cce (patch) | |
tree | ed3dc3576849bdf0be61ac304a10844f0c06b658 /gcc/function.c | |
parent | 63a329916eac6ae789325c43fc4a9db38a3c1534 (diff) | |
download | ppe42-gcc-3c7341749fd1a7007d577c9b92ba9a97365f0cce.tar.gz ppe42-gcc-3c7341749fd1a7007d577c9b92ba9a97365f0cce.zip |
*** empty log message ***
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1250 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/function.c b/gcc/function.c index 11070e0acc7..fd69b1823e1 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -3697,8 +3697,10 @@ expand_function_start (subr, parms_have_cleanups) /* If function gets a static chain arg, store it in the stack frame. Do this first, so it gets the first stack slot offset. */ if (current_function_needs_context) - emit_move_insn (assign_stack_local (Pmode, GET_MODE_SIZE (Pmode), 0), - static_chain_incoming_rtx); + { + last_ptr = assign_stack_local (Pmode, GET_MODE_SIZE (Pmode), 0); + emit_move_insn (last_ptr, static_chain_incoming_rtx); + } /* If the parameters of this function need cleaning up, get a label for the beginning of the code which executes those cleanups. This must @@ -3814,7 +3816,10 @@ expand_function_start (subr, parms_have_cleanups) /* Fetch static chain values for containing functions. */ tem = decl_function_context (current_function_decl); - if (tem) + /* If not doing stupid register allocation, then start off with the static + chain pointer in a pseudo register. Otherwise, we use the stack + address that was generated above. */ + if (tem && ! obey_regdecls) last_ptr = copy_to_reg (static_chain_incoming_rtx); context_display = 0; while (tem) |