aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/calls.c4
-rw-r--r--gcc/expr.c4
-rw-r--r--gcc/function.c3
-rw-r--r--gcc/libfuncs.h8
-rw-r--r--gcc/optabs.c7
-rw-r--r--gcc/profile.c9
7 files changed, 30 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9a558be..300f4e0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2003-04-11 Richard Henderson <rth@redhat.com>
+
+ * libfuncs.h (LTI_setbits, LTI_gcov_flush, LTI_gcov_init): New.
+ (setbits_libfunc, gcov_flush_libfunc, gcov_init_libfunc): New.
+ * optabs.c (init_optabs): Initialize them.
+ (init_libfuncs): Use init_one_libfunc.
+ * calls.c (expand_call): Use gcov_flush_libfunc.
+ * expr.c (store_constructor): Use setbits_libfunc.
+ * function.c (expand_main_function): Use init_one_libfunc.
+ * profile.c (create_profiler): Use gcov_init_libfunc and DECL_RTL.
+
2003-04-11 Mark Mitchell <mark@codesourcery.com>
* doc/c-tree.texi (Functions): Remove DECL_REAL_CONTEXT
diff --git a/gcc/calls.c b/gcc/calls.c
index f23b939..ffb8a21 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -2635,9 +2635,7 @@ expand_call (exp, target, ignore)
is subject to race conditions, just as with multithreaded
programs. */
- emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__gcov_flush"),
- LCT_ALWAYS_RETURN,
- VOIDmode, 0);
+ emit_library_call (gcov_flush_libfunc, LCT_ALWAYS_RETURN, VOIDmode, 0);
}
/* Ensure current function's preferred stack boundary is at least
diff --git a/gcc/expr.c b/gcc/expr.c
index 3d8903d..caf35cd 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -5450,8 +5450,8 @@ store_constructor (exp, target, cleared, size)
TYPE_MODE (sizetype));
}
else
- emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__setbits"),
- LCT_NORMAL, VOIDmode, 4, XEXP (targetx, 0),
+ emit_library_call (setbits_libfunc, LCT_NORMAL,
+ VOIDmode, 4, XEXP (targetx, 0),
Pmode, bitlength_rtx, TYPE_MODE (sizetype),
startbit_rtx, TYPE_MODE (sizetype),
endbit_rtx, TYPE_MODE (sizetype));
diff --git a/gcc/function.c b/gcc/function.c
index 1f2ed44..699fd21 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6470,8 +6470,7 @@ expand_main_function ()
#endif
#ifndef HAS_INIT_SECTION
- emit_library_call (gen_rtx_SYMBOL_REF (Pmode, NAME__MAIN), LCT_NORMAL,
- VOIDmode, 0);
+ emit_library_call (init_one_libfunc (NAME__MAIN), LCT_NORMAL, VOIDmode, 0);
#endif
}
diff --git a/gcc/libfuncs.h b/gcc/libfuncs.h
index bb2aa17..79b7d42 100644
--- a/gcc/libfuncs.h
+++ b/gcc/libfuncs.h
@@ -44,6 +44,7 @@ enum libfunc_index
LTI_bcmp,
LTI_memset,
LTI_bzero,
+ LTI_setbits,
LTI_unwind_resume,
LTI_eh_personality,
@@ -143,6 +144,9 @@ enum libfunc_index
LTI_profile_function_entry,
LTI_profile_function_exit,
+ LTI_gcov_flush,
+ LTI_gcov_init,
+
LTI_MAX
};
@@ -171,6 +175,7 @@ extern GTY(()) rtx libfunc_table[LTI_MAX];
#define bcmp_libfunc (libfunc_table[LTI_bcmp])
#define memset_libfunc (libfunc_table[LTI_memset])
#define bzero_libfunc (libfunc_table[LTI_bzero])
+#define setbits_libfunc (libfunc_table[LTI_setbits])
#define unwind_resume_libfunc (libfunc_table[LTI_unwind_resume])
#define eh_personality_libfunc (libfunc_table[LTI_eh_personality])
@@ -271,4 +276,7 @@ extern GTY(()) rtx libfunc_table[LTI_MAX];
#define profile_function_entry_libfunc (libfunc_table[LTI_profile_function_entry])
#define profile_function_exit_libfunc (libfunc_table[LTI_profile_function_exit])
+#define gcov_flush_libfunc (libfunc_table[LTI_gcov_flush])
+#define gcov_init_libfunc (libfunc_table[LTI_gcov_init])
+
#endif /* GCC_LIBFUNCS_H */
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 14d93c6..fc00b18 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -5329,8 +5329,7 @@ init_libfuncs (optable, first_mode, last_mode, opname, suffix)
*p = '\0';
optable->handlers[(int) mode].libfunc
- = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (libfunc_name,
- p - libfunc_name));
+ = init_one_libfunc (ggc_alloc_string (libfunc_name, p - libfunc_name));
}
}
@@ -5647,6 +5646,7 @@ init_optabs ()
bcmp_libfunc = init_one_libfunc ("__gcc_bcmp");
memset_libfunc = init_one_libfunc ("memset");
bzero_libfunc = init_one_libfunc ("bzero");
+ setbits_libfunc = init_one_libfunc ("__setbits");
unwind_resume_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS
? "_Unwind_SjLj_Resume"
@@ -5756,6 +5756,9 @@ init_optabs ()
profile_function_exit_libfunc
= init_one_libfunc ("__cyg_profile_func_exit");
+ gcov_flush_libfunc = init_one_libfunc ("__gcov_flush");
+ gcov_init_libfunc = init_one_libfunc ("__gcov_init");
+
#ifdef HAVE_conditional_trap
init_traps ();
#endif
diff --git a/gcc/profile.c b/gcc/profile.c
index 7593144..07f7a72 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -1979,13 +1979,8 @@ create_profiler ()
cfun->arc_profile = 0;
/* Actually generate the code to call __gcov_init. */
- gcov_info_address = force_reg (Pmode,
- gen_rtx_SYMBOL_REF (
- Pmode,
- IDENTIFIER_POINTER (
- DECL_NAME (gcov_info))));
- emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__gcov_init"),
- LCT_NORMAL, VOIDmode, 1,
+ gcov_info_address = force_reg (Pmode, XEXP (DECL_RTL (gcov_info), 0));
+ emit_library_call (gcov_init_libfunc, LCT_NORMAL, VOIDmode, 1,
gcov_info_address, Pmode);
expand_function_end (input_filename, lineno, 0);