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

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



Having a separate stack for return addresses (call stack) is a good argument
for an easy backtracing of what is calling what. For garbage collectors, it
is also good since data stack can only contain data relative stuff. Just a
precision : the difference between the top and the bottom of the call stack
gives us the call depth.

But still it is not an hardware issue since we don't need to rely upon a
special opcode to do so.

The pre/post-increment/decrement remains a problem depending how you intend
to handle asynchrounous events as exception or interrupt.


----- Original Message -----
From: "Ben Franchuk" <bfranchuk@jetnet.ab.ca>
To: <f-cpu@seul.org>
Sent: Tuesday, July 23, 2002 5:26 PM
Subject: Re: Rep:Re: Rep:Re: [f-cpu] Stack handling


> Nicolas Boulay wrote:
> > 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...
>
>
> Hmm just like Forth.:)
> crash_os() { crash_os(); }
>
> --
> Ben Franchuk - Dawn * 12/24 bit cpu *
> www.jetnet.ab.ca/users/bfranchuk/index.html
>
> *************************************************************
> 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/