Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.ecp.fr!aioe.org!.POSTED!not-for-mail From: Walter Banks Newsgroups: comp.lang.forth Subject: Re: Metrics on stack usage Date: Wed, 17 Sep 2014 17:41:02 -0400 Organization: Aioe.org NNTP Server Lines: 48 Message-ID: <5419FFEE.27412D2C@bytecraft.com> References: <541855C0.2558D27D@bytecraft.com> NNTP-Posting-Host: 3UWArZOAzLnoO3sfAplcDA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Mailer: Mozilla 4.79 [en]C-CCK-MCD NSCPCD479 (Windows NT 5.0; U) X-Accept-Language: en X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:33409 stephen@mpeforth.com wrote: > On Tuesday, 16 September 2014 16:21:35 UTC+1, Walter Banks wrote: > > I am working on a code generator for a stack processor. > > > > Who better to ask about real stack requirements than a forth group. > > > > The question is what is the expected stack requirements for a > > forth implementation? > > Apart from Phil Koopman's book on stack machines, Chris Bailey's work at the > University of Teesside and the University of York is relevant, especially if you > want to run C well on a dual stack machine. Also see my articles Modern > Forth and Extreme Forth in DDJ - I'm away at the moment so can't give > you all the references directly. > > You will find that the "pure" dual stack machine is not a good target for C. > Adding 2 to 4 registers and some deeper data stack access instructions > improves code density and performance greatly. The numbers are in > Chris Bailey's papers. Both the Teesside and the York UFO machines > were projects part-sponsored by MPE. > > Feel free to contact me directly if you want to. > > Stephen I have Phil Koopman's book Thanks for the Chris Bailey's reference. We did a C code generator a few years ago for a dual stack machine as an internal exercise and did a C to forth translation both did not produce the results we were looking for or needed. The C to forth had some inherent code reliability issues suitable for a long thread of heated debate. This is a travel week for me as well, but I will contact you when I am back w..