A comparison of instruction sets for stack machines

Bhaskaram Prabhala, Ravi Sethi

Research output: Chapter in Book/Report/Conference proceedingConference contribution

5 Citations (Scopus)

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.

Original languageEnglish (US)
Title of host publicationProceedings of the Annual ACM Symposium on Theory of Computing
PublisherAssociation for Computing Machinery
Pages132-142
Number of pages11
Volume02-04-May-1977
DOIs
StatePublished - May 4 1977
Externally publishedYes
Event9th Annual ACM Symposium on Theory of Computing, STOC 1977 - Boulder, United States
Duration: May 2 1977May 4 1977

Other

Other9th Annual ACM Symposium on Theory of Computing, STOC 1977
CountryUnited States
CityBoulder
Period5/2/775/4/77

Fingerprint

Hardware
Data storage equipment

ASJC Scopus subject areas

  • Software

Cite this

Prabhala, B., & Sethi, R. (1977). A comparison of instruction sets for stack machines. In Proceedings of the Annual ACM Symposium on Theory of Computing (Vol. 02-04-May-1977, pp. 132-142). Association for Computing Machinery. https://doi.org/10.1145/800105.803403

A comparison of instruction sets for stack machines. / Prabhala, Bhaskaram; Sethi, Ravi.

Proceedings of the Annual ACM Symposium on Theory of Computing. Vol. 02-04-May-1977 Association for Computing Machinery, 1977. p. 132-142.

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Prabhala, B & Sethi, R 1977, A comparison of instruction sets for stack machines. in Proceedings of the Annual ACM Symposium on Theory of Computing. vol. 02-04-May-1977, Association for Computing Machinery, pp. 132-142, 9th Annual ACM Symposium on Theory of Computing, STOC 1977, Boulder, United States, 5/2/77. https://doi.org/10.1145/800105.803403
Prabhala B, Sethi R. A comparison of instruction sets for stack machines. In Proceedings of the Annual ACM Symposium on Theory of Computing. Vol. 02-04-May-1977. Association for Computing Machinery. 1977. p. 132-142 https://doi.org/10.1145/800105.803403
Prabhala, Bhaskaram ; Sethi, Ravi. / A comparison of instruction sets for stack machines. Proceedings of the Annual ACM Symposium on Theory of Computing. Vol. 02-04-May-1977 Association for Computing Machinery, 1977. pp. 132-142
@inproceedings{1f1084c6ec9d4c47b9d219cbb8014c98,
title = "A comparison of instruction sets for stack machines",
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.",
author = "Bhaskaram Prabhala and Ravi Sethi",
year = "1977",
month = "5",
day = "4",
doi = "10.1145/800105.803403",
language = "English (US)",
volume = "02-04-May-1977",
pages = "132--142",
booktitle = "Proceedings of the Annual ACM Symposium on Theory of Computing",
publisher = "Association for Computing Machinery",

}

TY - GEN

T1 - A comparison of instruction sets for stack machines

AU - Prabhala, Bhaskaram

AU - Sethi, Ravi

PY - 1977/5/4

Y1 - 1977/5/4

N2 - 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.

AB - 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.

UR - http://www.scopus.com/inward/record.url?scp=84910523789&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=84910523789&partnerID=8YFLogxK

U2 - 10.1145/800105.803403

DO - 10.1145/800105.803403

M3 - Conference contribution

AN - SCOPUS:84910523789

VL - 02-04-May-1977

SP - 132

EP - 142

BT - Proceedings of the Annual ACM Symposium on Theory of Computing

PB - Association for Computing Machinery

ER -