[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
> > (call-clobbered)
> > 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
> > (r2-r3,r3-r4,...,r14,r15).
> >
> > 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
> > temporary 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...
I am currently asking the same question with a little variation, why
not putting in r31 the pointer to parameter allocated stack.

> Just a precision, the life of a temporary register in a function lasts
> between the time it assigned and the time a call of a function is done
> therein or the function exits, unlike local registers which would last
> between the start and the end of the function where it is used.
of course.

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