[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rep:Re: Re: [f-cpu] New suggestion about call convention
Well, if we want for F-CPU to be KISS, we need to consider loadm/storem
rather as a macro than as a real instruction indeed.
storem r16,[sp],r31 will be rewritten as :
store [sp]+,r16
store [sp]+,r17
...
store [sp],r31
(note: i choose here the third register field as source register for
'store' to be consistant with 'load')
and loadm r16,[sp],r31 :
load [sp]-,r31
load [sp]-,r30
...
load [sp],r16
Just a problem : whygee stated that there would not be any pre-decrement
addresses, so I was forced to use a post-decrement - especially without
modifying the address register of the last store/load. But just after a
"store [sp],r31" for example, if we call a sub-function with other stores,
we will crash the saved value of r31. So my question is : what must I do to
change the address register without discarding its pointer status ? (you
know, Whygee, you told me if I do "add 8,sp,sp", sp would no longer be
considered as a pointer).
Replace
store [sp],r31
with
store [sp]+,r31
and
load [sp]-,r31
with
load [sp]-,r0
load [sp]-,r31
is annoying if we still need to wait for reading [sp].
----- Original Message -----
From: "Nicolas Boulay" <nicolas.boulay@ifrance.com>
To: <f-cpu@seul.org>
Sent: Wednesday, November 06, 2002 3:57 PM
Subject: Rep:Re: Re: [f-cpu] New suggestion about call convention
-----Message d'origine-----
De: "Christophe Avoinne" <christophe.avoinne@laposte.net>
A: <f-cpu@seul.org>
Date: 06/11/02
Objet: Re: Re: [f-cpu] New suggestion about call convention
>>> It make me a pain in the ass to say that... i finaly agree with
whygee : KISS ! (keep it simple and stupid)
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu in the body. http://f-cpu.seul.org/