Saturday, January 1, 2011

addressing modes in computer architecture

Addressing Modes:
Given an address, we now know what bytes to access in memory. In this
section we will look at addressing modes—how architectures specify the
address of an object they will access. Addressing mode specify constants
and registers in addition to locations in memory. When a memory location is
used, the actual memory address specified by the addressing mode is called
the effective address.
Immediates or literals are usually considered memory-addressing modes
(even though the value they access is in the instruction stream), although
registers are often separated. We have kept addressing modes that depend
on the program counter, called PC-relative addressing , separate. PCrelative
addressing is used primarily for specifying code addresses in control
transfer instructions, discussed .
Figure shows the most common names for the addressing modes, though the
names differ among architectures. In this figure and throughout the book,
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 contents of the memory location whose address is given by the
contents of register 1 ( R1 ). Later, we will introduce extensions for
accessing and ransferring 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 CPI (clock
cycles per instruction) of computers that implement those modes. Thus, the
usage of various addressing modes is quite important in helping the architect
choose what to include.

No comments:

Post a Comment