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

Re: [f-cpu] Memory add/sub



hello,

i really wonder what this thing is really about...
anyway.

Michael Riepe wrote:
> On Sun, Sep 01, 2002 at 03:30:53PM +0200, Cedric BAIL wrote:
> >   If we want to correctly manage a stack with pop/push operation, we need a
> > add/sub operator that preserve the LSU information bit.
really ?
push/pop is just one use of pointer updates, and the existing
post-increment (with register or immediate modifier) has
already been discussed, right ?

> > I propose something
> > like that : madd[0-7] and msub[0-7]. I don't know if we need size for
> > this operation or endian, I think not. Stream information is needed if we want
> > to implement them by simply multipling the number of LSU.
do you mean that you want to add or substract up to 7 bytes from a pointer ?
the existing post-increment does this already, and you get a load or store
for free. If you want to hust update the pointer, "load" R0 so the result
is cancelled. "Think RISC". Or should i say : project yourself in an
over-simplified world.

> >   In the same idea I think we need to affect some stream, for example 0 for
> > unknow stream and 7 for stack. What did you think about that ?
allocating stream now would reduce our scalability in the future :
we still have a lot of other means to do specific things : we can add
some instructions for example.

> I already outlined the need for such a `pointer add' instruction last
> year. Programs that deal with structures (or classes/objects) will
> need it quite often.
then just do a "load" to this pointer, put the result in R0
and update the pointer with the register or immediate value you want.

Is a specific instruction really needed ?

>  Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
WHYGEE (currently digging in the pthread docs and looking at pthread_mutex)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/