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

Re: Rep:Re: Rep:Re: [f-cpu] Stack handling



Please, I would like to know if using several registers as stack pointers
pointing out on the same stack but with interleaved offset is a good way to
reduce dependency register (in fact using contiguous store +8,r64,r? has or
not depencency problem like in x86 ?)

> to push r1..r6, do :
>
> addi     -8  ,r62,r8
> store    -16,r62,r1
> store    -16,r8  ,r2
> store    -16,r62,r3
> store    -16,r8  ,r4
>
> store    -0  ,r62,r5
> store    -0  ,r8  ,r6
>
> instead of :
>
> store    -8,r62,r1
> store    -8,r62,r2
> store    -8,r62,r3
> store    -8,r62,r4
>
> store    -8,r62,r5
> store    -0,r62,r6
>
> why not a triple stack ?
>
> addi     -8  ,r62,r8
> addi     -16,r62,r9
> store    -24,r62,r1
> store    -24,r8  ,r2
> store    -24,r9  ,r3
> store    -0  ,r62,r4
>
> store    -0  ,r8  ,r5
> store    -0  ,r9  ,r6
>
> ----- Original Message -----
> From: "Nicolas Boulay" <nicolas.boulay@ifrance.com>
> To: <f-cpu@seul.org>
> Sent: Tuesday, July 23, 2002 4:27 PM
> Subject: Rep:Re: Rep:Re: [f-cpu] Stack handling
>
>
> Stack have a main draw back : it's add a udge dependancies in a single
> poor register (the stack pointer).
>
> For security reason, i have proposed to use 2 stack : one for data, one
> for code. So buffer overflow will became really hard ! this could be
> usefull for performance, too. But most of the time, the stack will use
> the register bank...
>
> And that doesn't solve the problem of push and pop.
>
> nicO
>
> -----Message d'origine-----
> De: Thomas Lavergne <thomas.lavergne@laposte.net>
> A: f-cpu@seul.org
> Date: 23/07/02
> Objet: Re: Rep:Re: [f-cpu] Stack handling
>
> Have you ever written a compiler ?
>
> A stack is the most simple and clean solution to handle a lot of thing.
> We have a lot of register so most compiler simulate the first stack
> push/pop with reg but when the stack grow we need a real stack handling.
>
> If we haven't stack we must reinvent the weel or back 50 years ago in
> compiler theorie.
>
> The debat about the number of stack is another thing, I think we need
> some instruction for stack (pre-dec) on all register so we can have all
> stack we need.
>
> Juergen Goeritz wrote:
> > No, it's not a stupid question at all. I had the same
> > first thought when I read the posting. You may just
> > have a need for a seperate stack for the scheduling
> > handler.
> >
> > JG
> >
> >
> > On Tue, 23 Jul 2002, Nicolas Boulay wrote:
> >
> >>Maybe it's a stupid question, but why it's forced to try to simulate a
> >>simple stack. There is no hardware support for stack in the f-cpu. Why
> >>not using a completely different pointer for such things ? Why must we
> >>stuck to the use of one single stack ?
> >>
> >>nicO
> >>
>
>
>
> --
> Thomas Lavergne                       "Le vrai rêveur est celui qui rêve
>                                         de l'impossible."  (Elsa
> Triolet)
> thomas.lavergne@laposte.net
> d-12@laposte.net    ICQ:#137121910     http://assoc.wanadoo.fr/thallium/
>
>
> *************************************************************
> To unsubscribe, send an e-mail to majordomo@seul.org with
> unsubscribe f-cpu       in the body. http://f-cpu.seul.org/
>
>
>
____________________________________________________________________________
> __
> ifrance.com, l'email gratuit le plus complet de l'Internet !
> vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
> http://www.ifrance.com/_reloc/email.emailif
>
>
> *************************************************************
> To unsubscribe, send an e-mail to majordomo@seul.org with
> unsubscribe f-cpu       in the body. http://f-cpu.seul.org/
>
> *************************************************************
> To unsubscribe, send an e-mail to majordomo@seul.org with
> unsubscribe f-cpu       in the body. http://f-cpu.seul.org/

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