This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch i386]: Add for win32 targets pre-prologue profiling feature


On 07/15/2010 11:08 AM, Kai Tietz wrote:
> 	(override_options): Add special handling for -mfentry.
> 	(ix86_function_regparm): Likewise.
> 	(ix86_function_sseregparm): Likewise.

Why are you adding the special-casing to the two regparm functions?
You do realize that suddenly your mcount_top function may have zero
free registers with which to do its job.  I think that's a bad idea.

> 	(ix86_save_reg):
> 	(ix86_expand_prologue):
> 	(x86_function_profiler):

No changes?  ;-)

x86_function_profiler is broken for -m32 -fentry -fpic.  It uses
%ebx which has not been set up.  I think perhaps this combination
cannot really be supported, and this should be diagnosed back in
override_options.

> +@hook TARGET_PROFILE_BEFORE_PROLOGUE
> +It returns true if target wants profile code emitted before
> +prologue.
> +
> +The default version of this hook use the target macro
> +@code{PROFILE_BEFORE_PROLOGUE}.
> +@end deftypefn

The text should go in target.def, in the ""; only the @hook line goes here.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]