[Top][All Lists]

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

Re: [avr-gcc-list] compiler function prologue/epilogue incorrect?

From: craig
Subject: Re: [avr-gcc-list] compiler function prologue/epilogue incorrect?
Date: Fri, 29 Sep 2006 14:36:54 +0200
User-agent: Mutt/1.4.1i

On Fri, Sep 29, 2006 at 02:05:56PM +0200, Craig Schlenter wrote:
> I seem to have solved the gcc problem I had by forcing the compiler not
> to inline several functions ... gcc-3.3.2 never inlined the code but later
> versions did inline. Curiously the function prologue doesn't have this
> CLI construct in the non-inlined working version of the code but
> I haven't studied the assembly closely enough to be able to say for
> sure what was broken in the inlined version yet ...

Fixed it!!!! There was an assembler interrupt routine that was messing
with r29 without the appropriate push/pop (duh!) and since the
epilogue/prologue cached the stack pointer in r29 the stack pointer
was messed up. Boom.

The code runs happily now with/without inline etc. on a range of compiler
versions now that the real bug is fixed. Whew ...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]