On Wednesday 12 May 2004 02:33, Mauricio Scaff wrote:
> Hi,
> I have a lot of questions :
>
> 1) How do I know what have changed between 2 mspgcc releases ? Is there
> some ChangeLog file ?
>

normally, we use 3.2 release. So, if new feature being added to the compiler,
I post announcement here.


> 2) Is there some way to know the maximum stack size used by a program or I
> must look at the assembly code and start counting ?
>

you have to check an assembly code if you want to know it before mcu burning, 
or use built-in variable to check it at run time (explained in docs)


> 3) Why :
>    while (cnt--)
>     {
>       anything.....
>     }
>

it compiles into:
        if not cnt skip loop
                else
        decrement cnt
        execute loop
        if cnt goto decrement loop, again;

> compiles using two comparisions of cnt  ?
>     while (cnt)
>     {
>         cnt--;
>          anything...
>     }
> works fine.
both work fine :)


>
> 4) Why the flag -O1 generates a smaller code than -O2 and -Os ?
>
This is a size vs. run time performance thing.
However, sometimes -O2 produces smaller code than -O1.
It depends mostly on stack requirements.


> Thanks, Mauricio

have fun,
~d

Reply via email to