Re: gcc forgets to decrease esp after function call

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

 



Hi again,

Ok, thank you.
I'll try to prepare minimal testcase. It is not so easy
because the problem apears while handling complex
templated code.

But I need advices about workarround the problem.
Say,
How can I force gcc to use ebp instead of
esp to address local variables?

How can I force gcc to use "leave"(ebp) on function return
instead of "add XXX, esp"?

If above is possible incorrect esp hanling may
be easy workarrounded.

Thank you in advance
Vladimir Simonov


Andrew Haley wrote:
Vladimir Simonov writes:
 > Hi
> > To be distinct.
 > Here is the problem function.

OK, thanks, now it is clear.  The "ret 4" removes a word from the
stack that belongs to the caller.

This is, as you say, definitely a code generation bug.  Now, we have a
problem.  You would like it fixed, but you can't produce a test case
that a gcc maintainer can use for a bug report.  If you can produce a
test case we can see if tis is fixed in other gcc versions.

Andrew.


[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