EmbeddedRelated.com
Forums

Processors who's stack grows up

Started by Adam Messer January 4, 2005
On 2005-01-05, Al <alnews67@hotmail.com> wrote:

>> Interesting that you can't actually name any... > > 8051.
Not relevent.
>> Why? > > Because I need it to work on any processor. *ANY* processor. > Even those that don't exist yet ;-)
That's an unrealistic expection. -- Grant Edwards grante Yow! I want another at RE-WRITE on my CEASAR visi.com SALAD!!
Richard,

    You are correct. We don't do 8-bits anyway, but thanks for the input!

Adam

"www.FreeRTOS.org" <noemail@given.com> wrote in message 
news:tUzCd.42971$48.1879@fe1.news.blueyonder.co.uk...
> > "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 > >
Georgi,

    Thanks for the input!

Adam

"Georgi Beloev" <gbH8SPAM@beloev.net> wrote in message 
news:ztudncoe188mTEfcRVn-rg@megapath.net...
> 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
> Not a joy. Just professional. I need products that work. Always. Nucleus > always did. I don't want it changed! > > Al.
If you want to product that always work , then you cannot select a CPU where the stack grows up, so Nucleus will work for you anyway. Thus no motivation to keep that code in Nucleus... -- 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
On 5 Jan 2005 20:29:28 GMT, Al <alnews67@hotmail.com> wrote:

[Snipped]
> >I've worked with Nucleus source code on many occasions and have had no >problems regarding readability :-) Conditionals can be easily stripped with >a preprocessor, so I don't generally worry.
[Snipped] Regarding the point above. Normally when using a preprocessor to strip out the conditional code. It expands everything. Is there an option or other tool that will only strip out the conditionals ? Regards Anton Erasmus
>PIC and 8051 I think. Don't suppose you are interested in these those.
PICs (at least the 12-bit and 14-bit cores) don't have a memory-mapped stack, so whether they grow up or down is invisible and hence irrelevant. Wouter van Ooijen -- ------------------------------------ http://www.voti.nl Webshop for PICs and other electronics http://www.voti.nl/hvu Teacher electronics and informatics
"Wouter van Ooijen (www.voti.nl)" <wouter@voti.nl> wrote in message
news:41dd6283.156976680@news.xs4all.nl...
> >PIC and 8051 I think. Don't suppose you are interested in these those. > > PICs (at least the 12-bit and 14-bit cores) don't have a memory-mapped > stack, so whether they grow up or down is invisible and hence > irrelevant. >
The Microchip PIC18 C compiler uses the POSTINC/POSTDEC registers to effect a stack and frame. Regards, http://www.FreeRTOS.org
>> Because I need it to work on any processor. *ANY* processor. >> Even those that don't exist yet ;-)
Such as my paper design for a balanced-ternary number system reconfigurable array processor? Which is unlikely to ever exist. -- mac the na&#4294967295;f
In article <1105005503.c2e7c4d716c50ca8103adc1a6645169f@teranews>,
	Anton Erasmus <nobody@spam.prevent.net> writes:
> On 5 Jan 2005 20:29:28 GMT, Al <alnews67@hotmail.com> wrote: > > [Snipped] >> >>I've worked with Nucleus source code on many occasions and have had no >>problems regarding readability :-) Conditionals can be easily stripped with >>a preprocessor, so I don't generally worry. > > [Snipped] > > Regarding the point above. Normally when using a preprocessor to strip > out the conditional code. It expands everything. Is there an option or > other tool that will only strip out the conditionals ? >
I'm using a tool called 'preparser' which comes from the isdn4linux community, see: http://www.isdn4linux.de/cgi-bin/viewcvs.cgi/isdn/README.preparser?rev=HEAD Apparently the sourcecode is not online, but the author says he'll send it upon request. Rob -- Robert Kaiser email: rkaiser AT sysgo DOT com SYSGO AG http://www.elinos.com Klein-Winternheim / Germany http://www.sysgo.com
In article <41dabc9a$1@solnews.wv.mentorg.com>,
	"Adam Messer" <adam_messer@mentor.com> writes:
> 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.
The MIPS processor doesn't really have a notion of a stack (and I suspect this applies to some other RISC architectures as well). It is up to the compiler to implement a stack and so a compiler writer can choose to let the stack grow up or down. However, I'm not aware of any MIPS compilers that actually let the stack grow up. Rob -- Robert Kaiser email: rkaiser AT sysgo DOT com SYSGO AG http://www.elinos.com Klein-Winternheim / Germany http://www.sysgo.com