|
ABSTRACT
Many machine languages have two instruction formats, one of which allows addressing of “nearby” operands with “short” (e.g. one word) instructions, while “faraway” operands require “long” format (e.g. two words). Because the distance between an instruction and its operand depends upon the formats of the intervening instructions, the formats of different instructions may be interdependent.
An efficient technique is discussed which optimally assigns formats to instructions in a given program and is practical in space as well as time. The more sophisticated problem of arranging operands within programs is discussed. Unfortunately, it is unlikely that an efficient algorithm can guarantee even a good approximation for this problem, since it is shown that r-approximation is NP-complete.
Finally, implications of these problems for hardware and software design are considered.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
1
|
|
| |
2
|
Common assembler language user's manual. Interdata Corp., Oceanport, N.J., 1974.
|
 |
3
|
|
| |
4
|
|
| |
5
|
GAREY, M.R., AND JOHNSON, D.S. Performance guarantees for heuristic algorithms. In Algorithms and Complexity: New Directions and Results, J.F. Traub, Ed., Academic Press, New York, 1976, pp. 41-52.
|
| |
6
|
HARRIS, K. The design and implementation of a compiler for a mini-computer. M.S. paper, Comptr. Sci. Dept., Pennsylvania State U., University Park, Pa., Aug. 1976.
|
| |
7
|
JOHNSON, D.S. Approximation algorithms for combinatorial problems. J. Comptr. Syst. Sci. 9, 3 (Dec. 1974), 256-278.
|
| |
8
|
KARP, R.M. Reducibility among combinatorial problems. In Complexity of Computer Computat/ons, Miller and Thatcher, Eds., Plenum Press, New York, 1972.
|
| |
9
|
|
 |
10
|
|
| |
11
|
ROBERTSON, E.L. Code generation for short/long address machines. Tech. Suture. Rep. 1979, Math. Res. Ctr., U. of Wisconsin, Madison, Wis., Aug. 1977.
|
| |
12
|
ROCHE, P. Code generation for PL 1600. M.S. paper, Comptr. Sci. Dept., Pennsylvania State U., University Park, Pa., Feb. 1977.
|
 |
13
|
|
 |
14
|
|
| |
15
|
|
|