[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Tiny bug with inline funcs
From: |
Denis Chertykov |
Subject: |
Re: [avr-gcc-list] Tiny bug with inline funcs |
Date: |
18 May 2001 18:29:39 +0400 |
Ludovic COURTES <address@hidden> writes:
> Hello,
>
> I noticed a kind of bug with gcc inline funcs. I have two functions f_sin()
> and f_cos() (they compute cosinus and sinus and return a fixed point number)
> which are static inline. When I do
> f_cos(angle); f_sin(angle);
> angle is not reloaded in between function calls. The matter is that my
> functions
> (which contains inline asm) stores their argument in Z and then modify it
> (thus, input operand constraint is "Z"(angle) ) ; so the second call doesn't
> have the right value of the argument.
>
> I fixed it by declaring the argument "static volatile" (so that it is stored
> in
> SRAM and reloaded when necessary). But is it a normal gcc behaviour ?
Please !
Send me an example too.
Denis.