Hardware Reference
In-Depth Information
FIGURE A.6 Selection of addressing modes with examples, meaning, and usage . In
autoincrement/-decrement and scaled addressing modes, the variable d designates the size
of the data item being accessed (i.e., whether the instruction is accessing 1, 2, 4, or 8 bytes).
These addressing modes are only useful when the elements being accessed are adjacent in
memory. RISC computers use displacement addressing to simulate register indirect with 0 for
the address and to simulate direct addressing using 0 in the base register. In our measure-
ments, we use the first name shown for each mode. The extensions to C used as hardware
descriptions are defined on page A-36.
Figure A.6 shows the most common names for the addressing modes, though the names dif-
fer among architectures. In this igure and throughout the topic, we will use an extension of
the C programming language as a hardware description notation. In this figure, only one non-
C feature is used: The left arrow (←) is used for assignment. We also use the array Mem as the
name for main memory and the array Regs for registers. Thus, Mem[Regs[R1]] refers to the con-
tents of the memory location whose address is given by the contents of register 1 ( R1 ). Later,
we will introduce extensions for accessing and transferring data smaller than a word.
Addressing modes have the ability to significantly reduce instruction counts; they also add
to the complexity of building a computer and may increase the average clock cycles per in-
struction (CPI) of computers that implement those modes. Thus, the usage of various address-
ing modes is quite important in helping the architect choose what to include.
 
Search WWH ::




Custom Search