Question: 8. Assume that computer M1 has CPU clock rate 2GHz, and supports four classes of instructions: ALU, load, store, branch/jump. Load has CPI = 5,
8. Assume that computer M1 has CPU clock rate 2GHz, and supports four classes of instructions: ALU, load, store, branch/jump. Load has CPI = 5, store has CPI =4, ALU instruction has CPI = 4, and branch/jump has CPI = 3. The following program P is used in testing the computer performance: F: SUBI SP, SP, #16 // (*) make room on the stack STUR X19, [SP, #0] // preserve X19 STUR X30, [SP, #8] // preserve the return location ADD X19, X2, X3 // calculate c+d // Clean up in preparation for tail call LDUR X19, [SP, #0] LDUR X30, [SP, #8] ADDI SP, SP, #16 // (*) BF // call g(g(a,b),c+d) with tail-call optimization a. What is the average CPI for program P? b. Another computer M2 with clock rate of 500MHz has the same performance as computer M1 when it runs the program P. What is the average CPI of computer M2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
