Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 2 [25 points]: Consider the MIPS code below and answer the following questions. addi $t0,$zero,0 addi $t1,$zero,100 loop beq $t0,$t1,exit addi $t2,$t0,10 sw $t2,
Question 2 [25 points]: Consider the MIPS code below and answer the following questions. addi $t0,$zero,0 addi $t1,$zero,100 loop beq $t0,$t1,exit addi $t2,$t0,10 sw $t2, 0($s0) addi $s0,$s0,4 addi $t0,$t0,1 loop exit (a) How many times will the beq statement be executed? (b) Assume that a static branch-not-taken prediction is used. What percentage of time will the prediction be correct? (c) Assume that a static branch-taken prediction is used. What percentage of time will the prediction be correct? Question 2 [25 points]: Consider the MIPS code below and answer the following questions. addi $t0,$zero,0 addi $t1,$zero,100 loop beq $t0,$t1,exit addi $t2,$t0,10 sw $t2, 0($s0) addi $s0,$s0,4 addi $t0,$t0,1 loop exit (a) How many times will the beq statement be executed? (b) Assume that a static branch-not-taken prediction is used. What percentage of time will the prediction be correct? (c) Assume that a static branch-taken prediction is used. What percentage of time will the prediction be correct
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started