* 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.
From-SVN: r65478
+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
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
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));
#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
}
\f
LTI_bcmp,
LTI_memset,
LTI_bzero,
+ LTI_setbits,
LTI_unwind_resume,
LTI_eh_personality,
LTI_profile_function_entry,
LTI_profile_function_exit,
+ LTI_gcov_flush,
+ LTI_gcov_init,
+
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])
#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 */
*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));
}
}
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"
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
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);