ACM Home Page
Please provide us with feedback. Feedback
Specifying representations of machine instructions
Full text PdfPdf (321 KB)
Source ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 19 ,  Issue 3  (May 1997) table of contents
Pages: 492 - 524  
Year of Publication: 1997
ISSN:0164-0925
Authors
Norman Ramsey  Univ. of Virginia, Charlottesville
Mary F. Fernández  AT&T Labs, Florham Park, NJ
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 16,   Downloads (12 Months): 61,   Citation Count: 25
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/256167.256225
What is a DOI?

ABSTRACT

We present SLED, a specification language for Encoding and Decoding, which describes, abstract, binary, and assembly-language representations of machine instructions. Guided by a SLED specification, the New Jersey Machine-Code Toolkit generates bit-manipulating code for use in applications that process machine code. Programmers can write such applications at an assembly language level of abstraction, and the toolkit enables the applications to recognize and emit the binary representations used by the hardware. SLED is suitable for describing both CISC and RISC machines; we have specified representations of MIPS R3000, SPARC, Alpha, and Intel Pentium instructions, and toolkit users have written specifications for the Power PC and Motorola 68000. The article includes representative excerpts from our SPARC and Pentium specifications. SLED uses four elements; fields and tokens describe parts of instructions; patterns describe binary representations of instructions or group of instructions; and constructors map between the abstract and binary levels. By combining the elements in different ways, SLED supports machine-independent implementations of machine-level concepts like conditional assembly, span-dependent instructions, relocatable addresses, object code, sections, and relocation. SLED specifications can be checked automatically for consistency with existing assemblers. The implementation of the toolkit is largely determined by our representations of patterns and constructors. We use a normal form that facilitates construction of encoders and decoders. The article describes the normal form and its use. The toolkit has been used to help build several applications. We have built a retargetable debugger and a retargetable, optimizing linker. Colleagues have built a dynamic code generator, a decompiler, and an execution-time analyzer. The toolkit generates efficient code; for example, the linker emits binary up to 15% faster than it emits assembly language, making it 1.7-2 times faster to produce an a.out directly than by using the assembler.


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
 
3
BRAUN~ O. C. 1996. Retargetability issues in worst-case timing analysis of embedded systems. Bachelor's thesis, Dept. of Computer Science, Princeton Univ., Princeton, N.J.
4
5
 
6
COOK~ T. AND HARCOURT~ E. 1994. A functional specification language for instruction set architectures. In Proceedings of the 1994 International Conference on Computer Languages. ACM, New York, 11-19.
7
 
8
ELSNER~ D., FENLASON~ J., ET AL. 1993. Using as: The GNU Assembler. Free Software Foundation, Cambridge, Mass.
 
9
10
11
12
 
13
 
14
GRAHAM, S. L., Lucco, S., AND WAHBE, R. 1995. Adaptable binary programs. In Proceedings of the 1995 USENIX Technical Conference. USENIX Assoc., Berkeley, Calif., 315-325.
 
15
 
16
HASTINGS, R. AND JOYCE, B. 1992. Purify: Fast detection of memory leaks and access errors. In Proceedings of the Winter USENIX Conference. USENIX Assoc., Berkeley, Calif., 125-136.
 
17
INTEL CORP. 1993. Architecture and Programming Manual. Intel Corp., Mount Prospect, Ill.
 
18
ISO. 1987. Information Processing Open Systems Interconnection Specification of Abstract Syntax Notation One (ASN.1). ISO 8824 (CCITT X.208). International Standards Organization, Geneva, Switzerland.
 
19
JOHNSON, S. C. 1990. Postloading for fun and profit. In Proceedings of the Winter USENIX Conference. USENIX Assoc., Berkeley, Calif., 325-330.
20
 
21
 
22
23
 
24
25
 
26
 
27
RAMSEY, N. AND FERNANDEZ, iV{. F. 1994a. New Jersey Machine-Code Toolkit architecture specifications. Tech. Rep. TR-470-94, Dept. of Computer Science, Princeton Univ., Princeton, N.J. Oct. Revised Dec., 1996.
 
28
RAMSEY, N. AND FERNANDEZ, iV{. F. 1994b. New Jersey Machine-Code Toolkit reference manual. Tech. Rep. TR-471-94, Dept. of Computer Science, Princeton Univ., Princeton, N.J. Oct. Revised Dec., 1996.
29
 
30
31
 
32
SRIVASTAVA~ A. AND WALL~ D. W. 1993. A practical system for intermodule code optimization. J. Program. Lang. 1, 1-18. Also available as WRL Res. Rep. 92/6, Dec. 1992.
33
34
 
35

CITED BY  25

Collaborative Colleagues:
Norman Ramsey: colleagues
Mary F. Fernández: colleagues