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

Re: [f-cpu] calling conventions



[Thomas]

>will give us :
>
>r1 += r2;
>
>instead of :
>
>r1 = r2 + r3;
>
>and save r3 for temporary register.

Bad example, you never make function like this is ridiculous, you
spent a lot of time in call of function so you don't see the other
benefit.
And with a more real example the econmics was not a real advantage
because you generaly need number of arg only in start or function so
you can use his register for temp var, like r3 in your example.

[Me]

Not so bad, if you use STL (c++) and bind functions, you have a class 'add' (or
something like) which defines an operator () to make the addition. So my
example would be good for this case ;P. Those classes are used to have compound
functions to pass as a template argument on other classes.



*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/