Hardware Reference
In-Depth Information
Summary: Encoding An Instruction Set
Decisions made in the components of instruction set design discussed in previous sections de-
termine whether the architect has the choice between variable and fixed instruction encodings.
Given the choice, the architect more interested in code size than performance will pick variable
encoding, and the one more interested in performance than code size will pick fixed encoding.
Appendix E gives 13 examples of the results of architects' choices. In Appendix C and Chapter
3 , the impact of variability on performance of the processor will be discussed further.
We have almost finished laying the groundwork for the MIPS instruction set architecture
that will be introduced in Section A.9 . Before we do that, however, it will be helpful to take a
brief look at compiler technology and its effect on program properties.
A.8 Crosscutting Issues: The Role of Compilers
Today almost all programming is done in high-level languages for desktop and server ap-
plications. This development means that since most instructions executed are the output of
a compiler, an instruction set architecture is essentially a compiler target. In earlier times for
these applications, architectural decisions were often made to ease assembly language pro-
gramming or for a specific kernel. Because the compiler will significantly affect the perform-
ance of a computer, understanding compiler technology today is critical to designing and ei-
ciently implementing an instruction set.
Once it was popular to try to isolate the compiler technology and its effect on hardware per-
formance from the architecture and its performance, just as it was popular to try to separate
architecture from its implementation. This separation is essentially impossible with today's
desktop compilers and computers. Architectural choices affect the quality of the code that can
be generated for a computer and the complexity of building a good compiler for it, for better
or for worse.
In this section, we discuss the critical goals in the instruction set primarily from the compiler
viewpoint. It starts with a review of the anatomy of current compilers. Next we discuss how
compiler technology affects the decisions of the architect, and how the architect can make it
hard or easy for the compiler to produce good code. We conclude with a review of compilers
and multimedia operations, which unfortunately is a bad example of cooperation between
compiler writers and architects.
The Structure Of Recent Compilers
To begin, let's look at what optimizing compilers are like today. Figure A.19 shows the struc-
ture of recent compilers.
 
Search WWH ::




Custom Search