Answered step by step
Verified Expert Solution
Link Copied!

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,

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

1. What do you want to accomplish in this meeting?

Answered: 1 week ago