Re: DEFAULT_CALLER_SAVES doesn't work on the mac

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Muhammed Fawzy" <mfawzymkh@xxxxxxxxxxx> writes:

> However, I think I wasn't clear in my question, please let me try to
> explain.
> the problem I am trying to solve  is that I want to save  ecx, edx
> registers around a specific function call, In my case I want to save
> them around mcount call ( when you compile with -pg switch, mcount is
> inserted after the prolog of each function ).
>
> the problem is that mcount and moncount implementation on the MAC
> trashes the value of ecx register, and gcc doesn't emit code to save
> registers around mcount calls..  I was hoping to find a gcc code gen
> option to force gcc to save and restore register values around mcount
> call.

I see.  The mcount function is a special part of the function prologue
and is not handled as a regular function call.  I don't think there is
any way to do this without modifying gcc itself.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux