diff options
author | kan <kan@FreeBSD.org> | 2004-01-05 22:23:27 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2004-01-05 22:23:27 +0000 |
commit | 3b9942df2ec53c4d5da1b5e21762a16757719512 (patch) | |
tree | 95b7fb3c6e8eab92ffef18f07c8ecdbfc6bcf35b /contrib | |
parent | be22b38f182218f5952699357d4312ab45b081ff (diff) | |
download | FreeBSD-src-3b9942df2ec53c4d5da1b5e21762a16757719512.zip FreeBSD-src-3b9942df2ec53c4d5da1b5e21762a16757719512.tar.gz |
Fix -mprofiler-epilogue on i386. This should be extended to other
architectures in future.
Submitted by: bde
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gcc/function.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/gcc/function.c b/contrib/gcc/function.c index e055375..71627b6 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) |