Question: 5. Assume that computer M1 has CPU clock rate 2GHz, and supports four classes of instructions: ALU, load, store, branch/jump. Load has CPI =
5. 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] LSL X30, X30, #2 ORR X30, X30, X19 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 3GHz 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
3.47 Rating (167 Votes )
There are 3 Steps involved in it
The image contains a question about computer performance with a provided assembly program and two subquestions Lets first analyze the program instruct... View full answer
Get step-by-step solutions from verified subject matter experts
