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]

Re: PATCH: Darwin / Mac OS X native support, revised


Richard Henderson wrote:
> 
> On Fri, Apr 06, 2001 at 03:45:14PM -0700, Stan Shebs wrote:
> > I believe that I've now accounted for all the feedback...
> [...]
> > + #undef FUNCTION_PROFILER
> > + #define FUNCTION_PROFILER(FILE, LABELNO)      \
> > +   darwin_output_function_profiler (FILE, LABELNO);
> 
> I did mention how you should look at PROFILE_HOOK, didn't I?
> You probably want something practically identical to the
> aix definition.  You can probably even remove the ABI check
> in output_profile_hook and just call the same function.

I did look at it, but for reasons unknown to me, the calling
conventions for Darwin mcount are rather different from the
system's normal calling conventions, and PROFILE_HOOK isn't
general enough to handle this; it assumes that mcount will be
called using standard library conventions for the target system.
It may be possible to change the implementation of mcount in a
future rev of Darwin, but not today.

Stan


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