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

Re: [f-cpu] calling conventions

> There is another point else which I would enlight : what about the ability to
> use a pair of registers to have 128 bit when 64 bits is default ? especially
> for such opcodes which use or return  a pair of register (Rn,Rn^1) ? not very
> good if the first parameter or return register starts from r1. Worse, what
> happen if we use an OPCODE which uses or computes a pair of register
> especially when Rn == R1 ? Rn^1 would be R0, but R0 is hardwired to 0 !

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

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...

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