From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2cb1f0b6d642e1dc X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Pascal Calling Convention Date: Sat, 26 Mar 2011 21:24:53 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <9b04626e-567d-408c-aab3-39b964b3ffd6@l2g2000prg.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1301192697 5240 69.95.181.76 (27 Mar 2011 02:24:57 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sun, 27 Mar 2011 02:24:57 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 Xref: g2news2.google.com comp.lang.ada:19462 Date: 2011-03-26T21:24:53-05:00 List-Id: "Robert A Duff" wrote in message news:wccbp0xy5hu.fsf@shell01.TheWorld.com... ... > Thanks for the clarification. I agree with the above, and of course I > agree that the stack doesn't have to be a contiguous block of memory. > But why do you call that "contiguous stack" thing a "hardware stack"? > I mean, on most architectures, push/pop are implemented by subtract/add > instructions on the stack pointer register. That's not a whole lot of > "hardware support for stacks". The hardware has instructions that > support implementing arrays, and linked lists, too, but we don't call them > "hardware arrays" or "hardware linked lists". > > OK, on x86, there are push/pop instructions. But most stack > manipulation is still just subtract/add. Call pushes a return address. > Enter/leave instructions are stack-oriented, but nobody uses those, > because they're slow. Maybe "the stack" on x86 could be called a > "hardware stack", but it's pretty marginal in practice. I can't speak for Keith, but most of the hardware architectures that I've worked on have had at least some architectual support for a "hardware" stack. Not only the Push/Pop instructions of the X86 for instance, but also the special SS stack segment register. The 68K also had a dedicated stack register and some special instructions for call/ret. Even the Unisys U2200 mainframe had a stack segment and special instructions for call/ret and stack frames. I agree that these things aren't that different than add or subtract, but given the way that they're documented (as a hardware-supported stack in each case), I think it is pretty obvious that these things exist. (Inventing your own terminology and ignoring the standard view of an architecture is a good way to confuse everyone who talks to you...) Randy.