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!feeder.erje.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: Mon, 28 Mar 2011 21:32:54 -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 1301365983 2134 69.95.181.76 (29 Mar 2011 02:33:03 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 29 Mar 2011 02:33:03 +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:19534 Date: 2011-03-28T21:32:54-05:00 List-Id: "Robert A Duff" wrote in message news:wcck4fjc99j.fsf@shell01.TheWorld.com... > "Randy Brukardt" writes: > >> 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. > > True, but nobody uses the SS register in any nontrivial way, anymore. > The segmentation stuff of 8086 is pretty much vestigial at this point. Not relevant to this discussion, but I think that's sad, as a lot of the security problems inherent in buffer overflows would have been avoided by simply keeping separate code and data segments. That would prevent code on the stack from being executed. (We found a lot of problems in Janus/Ada by keeping the code and data segments in our DOS Extender compilers completely separate; it's been quite a bit harder to find those problems on Windows or Unix systems that don't properly separate them.) The problem with segments is segments that are too small, not the basic idea. ... > "Stack" is a pretty well-understood term in computer science, Yes, of course. > and I think if an x86-centric person insists that "the stack" > must be a certain way based on the hardware/architecture, > they're the one inventing confusing terminology. Right again. But it seems to me that is a straw man. > Keith is trying to clarify, by calling that contiguous thing > a "hardware stack", but I'm saying the word "hardware" doesn't > capture the intended meaning. It does on most architectures. I don't believe I've ever seen a modern architecture without some sort of Call/Return instructions. Some of them allow use of any register, so there isn't a dedicated stack register. In any case, I read your reply as saying that it didn't make sense to ever refer to a "hardware stack", which makes no sense to me. As soon as you are talking about hardware or implementations, you are talking in a target-specific way, so it doesn't make much sense to make any generalizations. It makes perfect sense to talk about a hardware stack on an X86; if you are talking about some other target, maybe not. Randy.