Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/800105.803403acmconferencesArticle/Chapter ViewAbstractPublication PagesstocConference Proceedingsconference-collections
Article
Free access

A comparison of instruction sets for stack machines

Published: 04 May 1977 Publication History

Abstract

Suppose you are approached by a computer designer who wants to select a machine architecture and instruction set that is desirable from a compiler writers standpoint. What would you recommend, and why?
We give a limited answer to the above question. We focus on the computation of arithmetic expressions like a−b+c. When computing a−b we need different instructions depending on where a and b are to be found. On a programmable calculator for example, a or b may be on the stack, or stored in some memory register. We also need instructions that copy values from one place to another.
Algorithms that generate code for arithmetic expressions tend to treat general purpose registers as a stack. Moreover, results about machines that perform all arithmetic in a hardware stack are directly applicable to machines with general purpose registers. We therefore start our study of instruction sets by looking at stack machines.
We compare machines based on the number of instructions needed to compute a given expression. We then turn to algorithms that generate optimal programs for computing expressions on the various machines.

References

[1]
A. V. Aho and S. C. Johnson, Optimal code generation for expression trees, JACM 23, 3 (July 1976) 448-501.
[2]
A. V. Aho, S. C. Johnson and J. D. Ullman, Code generation for machines with multiregister operations, Fourth ACM Symposium on Principles of Programming Languages,(Jan. 1977).
[3]
J. Bruno and T. Lassagne, The generation of optimal code for stack machines, JACM 22, 3 (July 1975) 382-396.
[4]
Burroughs corporation, Burroughs B6700 Information Processing Systems, Reference Manual (1969).
[5]
A.P. Ershov, On programming of arithmetic operations, CACM 1,8 (Aug. 1958) 3-6.
[6]
Hewlett-Packard Company, HP-65 Owner's Handbook (July 1974).
[7]
D. E. Knuth, An empirical study of Fortran programs, Software-Practice and Experience 1 (1971) 105-133.
[8]
Ikuo Nakata, On compiling algorithms for arithmetic expressions, CACM 10, 8 (Aug. 1967) 492-494.
[9]
Ravi Sethi and J. D. Ullman, the generation of optimal code for arithmetic expressions, JACM 17, 4 (Oct. 1970) 715-728.

Cited By

View all
  • (2005)How hard is compiler code generation?Automata, Languages and Programming10.1007/3-540-08342-1_1(1-15)Online publication date: 24-May-2005
  • (1978)Efficient computation of expressions with common subexpressionsProceedings of the 5th ACM SIGACT-SIGPLAN symposium on Principles of programming languages10.1145/512760.512784(222-230)Online publication date: 1-Jan-1978

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
STOC '77: Proceedings of the ninth annual ACM symposium on Theory of computing
May 1977
318 pages
ISBN:9781450374095
DOI:10.1145/800105
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 04 May 1977

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Acceptance Rates

STOC '77 Paper Acceptance Rate 31 of 87 submissions, 36%;
Overall Acceptance Rate 1,469 of 4,586 submissions, 32%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)40
  • Downloads (Last 6 weeks)6
Reflects downloads up to 01 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2005)How hard is compiler code generation?Automata, Languages and Programming10.1007/3-540-08342-1_1(1-15)Online publication date: 24-May-2005
  • (1978)Efficient computation of expressions with common subexpressionsProceedings of the 5th ACM SIGACT-SIGPLAN symposium on Principles of programming languages10.1145/512760.512784(222-230)Online publication date: 1-Jan-1978

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media