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

Re: [f-cpu] calling conventions

Christophe wrote:

> I don't see the purpose to have so many global registers (shared by all
> functions). What can really be shareable between all functions ? very few
> indeed... unless it should be for kernel but even for such a thing it is a very
> bad idea because any applications might access or modify them.

So when does the RISC architecture model start to become
a 3 address machine with a single page of memory with direct addressing
and indrect addressing for all of memory and the first page of memory?

> 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 can
> happen if we use an OPCODE which uses or computes a pair of register (Rn,Rn^1),
> especially when Rn == R1 ? Rn^1 would be R0, but R0 is hardwired to 0 !

Good point , would R1 be better as arg count and R2/3 as return
registers and
R4+ as general function registers.

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