aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c71
1 files changed, 13 insertions, 58 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 21ab691..ba881c9 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -130,7 +130,6 @@ static bool contains (const_rtx, htab_t);
static void prepare_function_start (void);
static void do_clobber_return_reg (rtx, void *);
static void do_use_return_reg (rtx, void *);
-static void set_insn_locations (rtx, int) ATTRIBUTE_UNUSED;
/* Stack of nested functions. */
/* Keep track of the cfun stack. */
@@ -4644,51 +4643,6 @@ init_function_start (tree subr)
warning (OPT_Waggregate_return, "function returns an aggregate");
}
-
-void
-expand_main_function (void)
-{
-#if (defined(INVOKE__main) \
- || (!defined(HAS_INIT_SECTION) \
- && !defined(INIT_SECTION_ASM_OP) \
- && !defined(INIT_ARRAY_SECTION_ASM_OP)))
- emit_library_call (init_one_libfunc (NAME__MAIN), LCT_NORMAL, VOIDmode, 0);
-#endif
-}
-
-/* Expand code to initialize the stack_protect_guard. This is invoked at
- the beginning of a function to be protected. */
-
-#ifndef HAVE_stack_protect_set
-# define HAVE_stack_protect_set 0
-# define gen_stack_protect_set(x,y) (gcc_unreachable (), NULL_RTX)
-#endif
-
-void
-stack_protect_prologue (void)
-{
- tree guard_decl = targetm.stack_protect_guard ();
- rtx x, y;
-
- x = expand_normal (crtl->stack_protect_guard);
- y = expand_normal (guard_decl);
-
- /* Allow the target to copy from Y to X without leaking Y into a
- register. */
- if (HAVE_stack_protect_set)
- {
- rtx insn = gen_stack_protect_set (x, y);
- if (insn)
- {
- emit_insn (insn);
- return;
- }
- }
-
- /* Otherwise do a straight move. */
- emit_move_insn (x, y);
-}
-
/* Expand code to verify the stack_protect_guard. This is invoked at
the end of a function to be protected. */
@@ -5006,6 +4960,19 @@ do_warn_unused_parameter (tree fn)
warning (OPT_Wunused_parameter, "unused parameter %q+D", decl);
}
+/* Set the location of the insn chain starting at INSN to LOC. */
+
+static void
+set_insn_locations (rtx insn, int loc)
+{
+ while (insn != NULL_RTX)
+ {
+ if (INSN_P (insn))
+ INSN_LOCATION (insn) = loc;
+ insn = NEXT_INSN (insn);
+ }
+}
+
/* Generate RTL for the end of the current function. */
void
@@ -5335,18 +5302,6 @@ maybe_copy_prologue_epilogue_insn (rtx insn, rtx copy)
*slot = copy;
}
-/* Set the location of the insn chain starting at INSN to LOC. */
-static void
-set_insn_locations (rtx insn, int loc)
-{
- while (insn != NULL_RTX)
- {
- if (INSN_P (insn))
- INSN_LOCATION (insn) = loc;
- insn = NEXT_INSN (insn);
- }
-}
-
/* Determine if any INSNs in HASH are, or are part of, INSN. Because
we can be running after reorg, SEQUENCE rtl is possible. */