decoration decoration
Stories

GROKLAW
When you want to know more...
decoration
For layout only
Home
Archives
Site Map
Search
About Groklaw
Awards
Legal Research
Timelines
ApplevSamsung
ApplevSamsung p.2
ArchiveExplorer
Autozone
Bilski
Cases
Cast: Lawyers
Comes v. MS
Contracts/Documents
Courts
DRM
Gordon v MS
GPL
Grokdoc
HTML How To
IPI v RH
IV v. Google
Legal Docs
Lodsys
MS Litigations
MSvB&N
News Picks
Novell v. MS
Novell-MS Deal
ODF/OOXML
OOXML Appeals
OraclevGoogle
Patents
ProjectMonterey
Psystar
Quote Database
Red Hat v SCO
Salus Book
SCEA v Hotz
SCO Appeals
SCO Bankruptcy
SCO Financials
SCO Overview
SCO v IBM
SCO v Novell
SCO:Soup2Nuts
SCOsource
Sean Daly
Software Patents
Switch to Linux
Transcripts
Unix Books

Gear

Groklaw Gear

Click here to send an email to the editor of this weblog.


You won't find me on Facebook


Donate

Donate Paypal


No Legal Advice

The information on Groklaw is not intended to constitute legal advice. While Mark is a lawyer and he has asked other lawyers and law students to contribute articles, all of these articles are offered to help educate, not to provide specific legal advice. They are not your lawyers.

Here's Groklaw's comments policy.


What's New

STORIES
No new stories

COMMENTS last 48 hrs
No new comments


Sponsors

Hosting:
hosted by ibiblio

On servers donated to ibiblio by AMD.

Webmaster
stack architecture | 225 comments | Create New Account
Comments belong to whoever posts them. Please notify us of inappropriate comments.
stack architecture
Authored by: Anonymous on Thursday, May 10 2012 @ 10:08 PM EDT
The reason why stack hardware went into a deep slumber is more because of the
advent of caching.

Register-based computations are space wasters because of the number of concepts
that need to be implemented as separate instructions. If you can make
fast-enough cache so that you still have locality, you have a winner: Few cache
faults where the processor sits idle, fast instruction-level execution because
the opcode tell the CPU all it needs to know.

On a stack machine, one can have tiny (byte-size, hence "bytecode")
instructions, because the stack - which contains the operands - knows things
like size, type, in addition to location. So "add" is enough, no need
to have separate codes for "add-long", "add-float",
"add-float-to-double" etc.

With current technologies, and current types of problems to solve,
register-based keeps its momentum. Android was intended to run on off-the-shelf
hardware. Sun was thinking (dreaming?) of a Java physical CPU when this all
started...

Nothing is ever completely obsolete in cyberspace.

[ Reply to This | Parent | # ]

stack architecture
Authored by: bprice on Friday, May 11 2012 @ 12:42 AM EDT
But actually implementing something as a stack-based instruction set is an unwise decision. Some of the earliest computers did it because every logic gate was expensive. But as soon as the focus changed from "can it be done at all" to "how to do it well", register based execution models prevailed.
I call your attention to Sevaried's Law (Google it, if you wish): "The chief cause of problems is solutions."

The set of solution-caused problems of any solution in engineering is like a cake, you can have it or eat it. You can't do both.

Stack architecture is a solution. Register architecture is a solution. If you are faced with a choice, you must decide which problems you want to solve, and which ones you want to have. The register solution causes one set of solution-caused problems. The stack solution generates another. The choice is between the two sets of resulting problems. Burroughs and Sun chose one set; other folks choose the other.

Mostly, though, the choice is a hybrid — some aspects are register-oriented, some are stack-oriented. Hardly anybody, any more, tries to implement procedure/function calling without some sort of stack — even for C. But token-oriented architectures, like Java and the Burroughs Large Systems, present interesting issues when addressing is mixed in with operations, as in opcode+register or opcode+two-registers instruction format. RPN (implying a stack) separates addressing from operation, making token-fondling less of an issue.

What problems do you want to have to solve, based on your solution?

---
--Bill. NAL: question the answers, especially mine.

[ Reply to This | Parent | # ]

Groklaw © Copyright 2003-2013 Pamela Jones.
All trademarks and copyrights on this page are owned by their respective owners.
Comments are owned by the individual posters.

PJ's articles are licensed under a Creative Commons License. ( Details )