EmbeddedRelated.com
Forums

Processors who's stack grows up

Started by Adam Messer January 4, 2005
Hello,

    I am the lead engineer on the Nucleus Plus RTOS. One of my coworkers
asked me if I knew any processors that had a stack that grows up. The only
one I knew of, for sure, was the Intel i960. We have a fair amount of code
in our system that accommodates stacks that grow up. If we can't find a
reasonable number of processors who's stack does grow up we will remove that
code.

TIA,
Adam Messer
adam_messer@mentor.com


>any processors that had a stack that grows up
HP PA-RISC, not commonly used in embedded applications but it does exist. Couldn't point you to a part that is still in production, though. i960 and PA-RISC are essentially dead architectures; if you don't find a few architectures _with a future_ it probably won't hurt your market share any to remove support for these devices.
"Adam Messer" <adam_messer@mentor.com> wrote in message
news:41dabc9a$1@solnews.wv.mentorg.com...
> Hello, > > I am the lead engineer on the Nucleus Plus RTOS. One of my coworkers > asked me if I knew any processors that had a stack that grows up. The only > one I knew of, for sure, was the Intel i960. We have a fair amount of code > in our system that accommodates stacks that grow up. If we can't find a > reasonable number of processors who's stack does grow up we will remove
that
> code. > > TIA, > Adam Messer > adam_messer@mentor.com > >
PIC and 8051 I think. Don't suppose you are interested in these those. Regards, Richard. http://www.FreeRTOS.org
Adam Messer wrote:
> Hello, > > I am the lead engineer on the Nucleus Plus RTOS. One of my coworkers > asked me if I knew any processors that had a stack that grows up. The only > one I knew of, for sure, was the Intel i960. We have a fair amount of code > in our system that accommodates stacks that grow up. If we can't find a > reasonable number of processors who's stack does grow up we will remove that > code. > > TIA, > Adam Messer > adam_messer@mentor.com > >
On the ARM you can decrement or increment the stack pointer when loading multiple registers - take a look at LDMIA, LDMIB, LDMDA, and LDMDB. I don't know if any standard development environment uses the stack-growing-up convention. Regards, -- Georgi
Georgi Beloev wrote:
> Adam Messer wrote: > >> Hello, >> >> I am the lead engineer on the Nucleus Plus RTOS. One of my coworkers >> asked me if I knew any processors that had a stack that grows up. The >> only >> one I knew of, for sure, was the Intel i960. We have a fair amount of >> code >> in our system that accommodates stacks that grow up. If we can't find a >> reasonable number of processors who's stack does grow up we will >> remove that >> code. >> >> TIA, >> Adam Messer >> adam_messer@mentor.com >> >> > > On the ARM you can decrement or increment the stack pointer when loading > multiple registers - take a look at LDMIA, LDMIB, LDMDA, and LDMDB. I > don't know if any standard development environment uses the > stack-growing-up convention. >
In 32 bit mode ARM can handle the stack both ways. There is another degreee of freedom: whether the stack pointer points to the last used slot or the first free slot. In 16 bit Thumb mode of the T variants (e.g. ARM7TDMI), the stack is fixed to grow down. -- Tauno Voipio tauno voipio (at) iki fi
"Adam Messer" <adam_messer@mentor.com> wrote

> I am the lead engineer on the Nucleus Plus RTOS. One of my coworkers > asked me if I knew any processors that had a stack that grows up. The only > one I knew of, for sure, was the Intel i960.
8051 family -- Nicholas O. Lindan, Cleveland, Ohio Consulting Engineer: Electronics; Informatics; Photonics. Remove spaces etc. to reply: n o lindan at net com dot com psst.. want to buy an f-stop timer? nolindan.com/da/fstop/
Hello,

    To all who responded to the question, I say "Thank You"!

Adam

"Adam Messer" <adam_messer@mentor.com> wrote in message
news:41dabc9a$1@solnews.wv.mentorg.com...
> Hello, > > I am the lead engineer on the Nucleus Plus RTOS. One of my coworkers > asked me if I knew any processors that had a stack that grows up. The only > one I knew of, for sure, was the Intel i960. We have a fair amount of code > in our system that accommodates stacks that grow up. If we can't find a > reasonable number of processors who's stack does grow up we will remove
that
> code. > > TIA, > Adam Messer > adam_messer@mentor.com > >
In article <41dabc9a$1@solnews.wv.mentorg.com>,
Adam Messer <adam_messer@mentor.com> wrote:
> I am the lead engineer on the Nucleus Plus RTOS. One of my coworkers >asked me if I knew any processors that had a stack that grows up.
I think the PPC is stack-direction-agnostic, though I may be forgetting some corner case where the processor would care. There's no reason you'd define your OS to use an ABI with a stack growing up if it was a problem though. :) -- Ben Jackson <ben@ben.com> http://www.ben.com/
>I am the lead engineer on the Nucleus Plus RTOS.
I've worked with Nucleus+ for many years, but I don't recall your name. Sorry!
> asked me if I knew any processors that had a stack that grows up.
There are plenty.
> If > we can't find a reasonable number of processors who's stack does grow > up we will remove that code.
Unbelievable! An RTOS ***MUST*** be stack-agnostic!!!! Shit, looks like I'll be pulling nucleus from a current project ... Unbelievable... Al.
> Hello, > > I am the lead engineer on the Nucleus Plus RTOS. One of my coworkers > asked me if I knew any processors that had a stack that grows up. The only > one I knew of, for sure, was the Intel i960. We have a fair amount of code > in our system that accommodates stacks that grow up. If we can't find a > reasonable number of processors who's stack does grow up we will remove
that
> code. > > TIA, > Adam Messer > adam_messer@mentor.com >
Hi Adam, Maybe You should ask your colleagues doing Microtec compilers... An ARM compiler could be implemented that grew the stack upwards but I have not seen an ARM used this way. -- Best Regards, Ulf Samuelsson ulf@a-t-m-e-l.com This is a personal view which may or may not be share by my Employer Atmel Nordic AB