Consider adding a new addressing mode to MIPS. The addressingmode adds the conte
ID: 3608326 • Letter: C
Question
Consider adding a new addressing mode to MIPS. The addressingmode adds the contents oftwo registers with an 10-bit signed offset to obtain the effectiveaddress.
Our compiler will be changed so that code sequences of the form
ADD, R1, R1, R2
LW Rd, 100(R1) (or store)
will be replaced with a load (or store) using the new addressingmode. Studies on overall
instruction frequencies show that 35% of instructions are loads andstores.
a. Assume that the addressing mode can be used for 15% of thedisplacement loads and
stores. What is the ratio of instruction count on the enhanced MIPScompared to the
original MIPS?
b. If the new addressing mode lengthens the clock cycle by 7%,which machine will be
faster and by how much? Consider adding a new addressing mode to MIPS. The addressingmode adds the contents of
two registers with an 10-bit signed offset to obtain the effectiveaddress.
Our compiler will be changed so that code sequences of the form
ADD, R1, R1, R2
LW Rd, 100(R1) (or store)
will be replaced with a load (or store) using the new addressingmode. Studies on overall
instruction frequencies show that 35% of instructions are loads andstores.
a. Assume that the addressing mode can be used for 15% of thedisplacement loads and
stores. What is the ratio of instruction count on the enhanced MIPScompared to the
original MIPS?
b. If the new addressing mode lengthens the clock cycle by 7%,which machine will be
faster and by how much?