[bfin] Don't load the address of counter variable before calling _mcount ()

Jie Zhang jzhang918@gmail.com
Sat Nov 11 09:22:00 GMT 2006


On 11/10/06, Bernd Schmidt <bernds_cb1@t-online.de> wrote:
> Jie Zhang wrote:
> > Bernd Schmidt wrote:
> >> Maybe we could just define PROFILE_BEFORE_PROLOGUE?
> >>
> > I thought about this. In GCC internals manual, it's said that "The
> > details of how mcount expects to be called are determined by your
> > operating system environment, not by GCC." But there is no existing
> > system for Blackfin using mcount, so we have nothing we can refer to. So
> > I decided to follow the most common practice of other ports in GCC. Also
> > in GCC internals, it states that "This (no need for counter variable) is
> > true for almost all modern implementations." For Blackfin, adeos-tracer
> > is the only program using and providing mcount. And it does not need the
> > counter variable. Also the internals manual says that "Normally, the
> > profiling code comes after (function prologue)." So I chose the way as
> > in my patch.
>
> Ok then.
>
Thanks. Checked in on trunk, 4.1 and 4.2 branches.

Jie



More information about the Gcc-patches mailing list