aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc/function.c
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2004-01-05 22:23:27 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2004-01-05 22:23:27 +0000
commit973e839bed29e1b6ad7d7a784f3dca5e53cc79de (patch)
tree95b7fb3c6e8eab92ffef18f07c8ecdbfc6bcf35b /contrib/gcc/function.c
parent21d20e72de65f9e4365f084676bb9b47034df25a (diff)
downloadsrc-973e839bed29e1b6ad7d7a784f3dca5e53cc79de.tar.gz
src-973e839bed29e1b6ad7d7a784f3dca5e53cc79de.zip
Fix -mprofiler-epilogue on i386. This should be extended to other
architectures in future. Submitted by: bde
Notes
Notes: svn path=/head/; revision=124160
Diffstat (limited to 'contrib/gcc/function.c')
-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)