diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-07-16 19:03:06 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-07-16 19:03:06 +0000 |
commit | 97c44d443e5b2a0e049a4797994539e1ef5d7b68 (patch) | |
tree | da4671f6cf3e9cd5aa7f831833b3cbf6b76f14cd /gcc/function.c | |
parent | 72c89694184b8fd52343e4c2de4cebf2427b415c (diff) | |
download | ppe42-gcc-97c44d443e5b2a0e049a4797994539e1ef5d7b68.tar.gz ppe42-gcc-97c44d443e5b2a0e049a4797994539e1ef5d7b68.zip |
entered into RCS
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1594 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/gcc/function.c b/gcc/function.c index 02ce0f97517..37a0f47a0c8 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -2804,14 +2804,8 @@ assign_parms (fndecl, second_time) } DECL_RTL (parm) = stack_parm; } - else if (! ( -#if 0 /* This change was turned off because it makes compilation bigger. */ - !optimize -#else /* It's not clear why the following was replaced. */ - /* Obsoleted by preceding line. */ - (obey_regdecls && ! DECL_REGISTER (parm) + else if (! ((obey_regdecls && ! DECL_REGISTER (parm) && ! DECL_INLINE (fndecl)) -#endif /* layout_decl may set this. */ || TREE_ADDRESSABLE (parm) || TREE_SIDE_EFFECTS (parm) @@ -2858,6 +2852,24 @@ assign_parms (fndecl, second_time) else emit_move_insn (parmreg, validize_mem (entry_parm)); + /* If we were passed a pointer but the actual value + can safely live in a register, put it in one. */ + if (passed_pointer && nominal_mode != BLKmode + && ! ((obey_regdecls && ! DECL_REGISTER (parm) + && ! DECL_INLINE (fndecl)) + /* layout_decl may set this. */ + || TREE_ADDRESSABLE (parm) + || TREE_SIDE_EFFECTS (parm) + /* If -ffloat-store specified, don't put explicit + float variables into registers. */ + || (flag_float_store + && TREE_CODE (TREE_TYPE (parm)) == REAL_TYPE))) + { + parmreg = gen_reg_rtx (nominal_mode); + emit_move_insn (parmreg, DECL_RTL (parm)); + DECL_RTL (parm) = parmreg; + } + /* In any case, record the parm's desired stack location in case we later discover it must live in the stack. */ if (REGNO (parmreg) >= nparmregs) |