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

Re: [f-cpu] calling conventions

>Another proposal :
>r0            : zero
>r1            : pointer to variable or additional function arguments
>r2-r15     : function return values or arguments (call-clobbered)
>r16-r31   : temporary registers (call-clobbered)
>r32-r47   : local registers (callee-saver)
>r48-r63   : global or special registers
>that way we could handle pair of registers much smarter

OK but this is another calling convention not usefull for most of
language becouse they don't allow multiple return value so these language
don't use some register.

And you must add a pointer to additional return if you want to return
more than 14 values.

>personally, I'm wondering if it is really necessary to limit
>function argument
>to r15 instead of r31 or r29 (to be sure to have at least a pair of
>registers), in so far as we can consider that all function arguments
>not used
>by a function may be used as temporary registers by this function...

ok but if you want to have the minimum of dependencies in your code you
need some temp reg.
I think it was difficult in the start of your code if you have only 2
temp reg...

Thomas Lavergne                       "Le vrai rÍveur est celui qui rÍve
                                       de l'impossible."  (Elsa Triolet)
d-12@laposte.net    ICQ:#137121910     http://assoc.wanadoo.fr/thallium/

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