aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-04-25 19:08:04 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-04-25 19:08:04 -0400
commit9dc0f531444e86626bd6ede1d14aa8d0131eca1c (patch)
treeafb8ea145169e217b85ed4f490c21e79a0f28052
parent7d41fad55b1a03b074680a6b2045d844c8fe2ece (diff)
downloadgcc-9dc0f531444e86626bd6ede1d14aa8d0131eca1c.zip
gcc-9dc0f531444e86626bd6ede1d14aa8d0131eca1c.tar.gz
gcc-9dc0f531444e86626bd6ede1d14aa8d0131eca1c.tar.bz2
(assign_parms): If STACK_REGS is defined...
(assign_parms): If STACK_REGS is defined, generate USE insns before the function body, thus showing which registers are filled with parameters. From-SVN: r9461
-rw-r--r--gcc/function.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 48bcc9f..6a936ff 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -3497,6 +3497,17 @@ assign_parms (fndecl, second_time)
}
#endif /* 0 */
+#ifdef STACK_REGS
+ /* We need this "use" info, because the gcc-register->stack-register
+ converter in reg-stack.c needs to know which registers are active
+ at the start of the function call. The actual parameter loading
+ instructions are not always available then anymore, since they might
+ have been optimised away. */
+
+ if (GET_CODE (entry_parm) == REG && !(hide_last_arg && last_named))
+ emit_insn (gen_rtx (USE, GET_MODE (entry_parm), entry_parm));
+#endif
+
/* ENTRY_PARM is an RTX for the parameter as it arrives,
in the mode in which it arrives.
STACK_PARM is an RTX for a stack slot where the parameter can live