summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/gcc/function.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/gcc/function.c b/contrib/gcc/function.c
index e055375d8604..71627b63eba8 100644
--- a/contrib/gcc/function.c
+++ b/contrib/gcc/function.c
@@ -19,6 +19,8 @@ along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+/* $FreeBSD$ */
+
/* This file handles the generation of rtl code from tree structure
at the level of the function as a whole.
It creates the rtl expressions for parameters and auto variables
@@ -6995,6 +6997,19 @@ expand_function_end (filename, line, end_bindings)
Pmode);
}
+ if (current_function_profile && TARGET_PROFILER_EPILOGUE)
+ {
+ static rtx mexitcount_libfunc;
+ static int initialized;
+
+ if (!initialized)
+ {
+ mexitcount_libfunc = init_one_libfunc (".mexitcount");
+ initialized = 1;
+ }
+ emit_library_call (mexitcount_libfunc, LCT_NORMAL, VOIDmode, 0);
+ }
+
/* Let except.c know where it should emit the call to unregister
the function context for sjlj exceptions. */
if (flag_exceptions && USING_SJLJ_EXCEPTIONS)