summaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-28 18:00:09 +0000
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-28 18:00:09 +0000
commit8637d6a214e5baf0867c1fa7906f7c3f43c15ac8 (patch)
treee9456c08db3a11dbe46b002ed8ff55b4f9ebee25 /gcc/final.c
parent2d4466dd764a72c189f332d298ffada00d265175 (diff)
downloadgcc-8637d6a214e5baf0867c1fa7906f7c3f43c15ac8.tar.gz
2010-07-28 Kai Tietz <kai.tietz@onevision.com>
* config/i386/i386.h (MCOUNT_NAME_BEFORE_PROLOGUE): New. * config/i386/i386.c (ix86_profile_before_prologue): New. (override_options): Add special handling for -mfentry. (ix86_function_regparm): Likewise. (ix86_function_sseregparm): Likewise. (ix86_frame_pointer_required): Likewise. (ix86_expand_prologue): Check for ms_hook_prologue. (x86_function_profiler): Adjust mcount output. (TARGET_PROFILE_BEFORE_PROLOGUE): Define hook. * config/i386/i386.opt (mfentry): New. * doc/invoke.texi (mfentry): Add documentation. * doc/tm.texi: Regenerated.. * doc/tm.texi.in (TARGET_PROFILE_BEFORE_PROLOGUE): New. * final.c (final_start_function): Replace macro PROFILE_BEFORE_PROLOGUE by target hook. * function.c (thread_prologue_and_epilogue_insns): Likewise. * target.def (profile_before_prologue): New hook. * targhooks.c (default_profile_before_prologue): New. * targhooks.h (default_profile_before_prologue): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162651 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/final.c b/gcc/final.c
index fd597ac713d..c35ed7b75a5 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1546,10 +1546,8 @@ final_start_function (rtx first ATTRIBUTE_UNUSED, FILE *file,
/* The Sun386i and perhaps other machines don't work right
if the profiling code comes after the prologue. */
-#ifdef PROFILE_BEFORE_PROLOGUE
- if (crtl->profile)
+ if (targetm.profile_before_prologue () && crtl->profile)
profile_function (file);
-#endif /* PROFILE_BEFORE_PROLOGUE */
#if defined (DWARF2_UNWIND_INFO) && defined (HAVE_prologue)
if (dwarf2out_do_frame ())
@@ -1591,10 +1589,8 @@ final_start_function (rtx first ATTRIBUTE_UNUSED, FILE *file,
static void
profile_after_prologue (FILE *file ATTRIBUTE_UNUSED)
{
-#ifndef PROFILE_BEFORE_PROLOGUE
- if (crtl->profile)
+ if (!targetm.profile_before_prologue () && crtl->profile)
profile_function (file);
-#endif /* not PROFILE_BEFORE_PROLOGUE */
}
static void